Fix for a rare condition in flexible rotation potentials.