Make sure Segment#getLocation() always determines the right value for CurveLocation#parameter

Half the solution for #437.