This is intended to uncover non-deterministic sorting order for elements
with the same key.
However, the patch cannot be merged unless the failures it uncovers can
be fixed - otherwise bots will start breaking as soon as it merges.
The following are the current ninja check-all failures with this patch
(across all targets on an asserts build):