use a cmp sort instead of a <=> sort, because that's what merge does
Add slightly more useful debugging output when we fail from this error
Fixes #719839