Fix order of commands in checkSegmentIntersectionWithDirectPredecessor()