Remove redundant index check