chore: fixing short-circuiting issue in `Ordering.then` (#6907)

Thanks to @PatrickMassot for noticing the bug, and @digama0 for
diagnosing, fixing, and testing.
2 files changed