Add test to ensure Index sort is stable