Fix #8817: keep NewGRF order for object class sorting (#8818)