Additional test case for bug#1152 ("SORT not stable")