Avoid infinite recursion when indexing