Better sorting for assertions