More changes from Chris' review: simplify getIndices and avoid