Small optimization in simplify_indexed.