Fix more sorting test failures for 5.18