Final fix for #901: honor before and after
Cosmetic
Make the test more robust