Only copy index when index is changed