[DON'T MERGE] Add jitter to sorting algorithm

This prevents the appearance of a stable sort (where it really isn't) and
avoids confusing users.