Fix crash regarding the RK4 integrator trying to sample off the edge of the curve.

Note that we're still calculating way too many points, this just keeps it from rendering any of them and crashing the app.