Re #9468. Specify order when sorting indices.