The code was using the useless dangling handle at each end of the spline rather than the handle pointing inwards.