The blue rectangle is a correct loft, in which the parameter-0 points on the two segments can be connected by a line that does not cross the parameter-1 points.

The two green triangles are produced by the lofting of the second and third segments. Since the segments' direction do not match, you get a bow-tie pattern instead of a rectangle.

Please look at the source code of this page for more information.