Fix bug in resetIndices for unordered index.