Sorting slots: Include a comparison on old_code

to make it deterministic.
To v2.103.