Avoid rounding errors with intersection points.

This resolves #895.