Reduce Index.sort() to 1 loop.