Fix the TEST_ORDERED and -r thing with a Kludge

This does fix the TEST_ORDERED and -r thing.

However, the test is somewhat inelegant and this fix is not as universally useful as a hook.

At least, we can query the number of the repetition we are currently in.