Added a fix for when the overcrossing and one (or both) of the undercrossings of a segment coincide.  When this happens, we remove the initial or final segment of the path.