Remove unnecessary copies to speed up dihedral search.