Fix checks when a ring crossing includes the -pi/pi zone cut point.