See the bogus snapping here. The green line with an arrow is one of the linestrings being inserted (an edge). The triangle on the top-right is the other line which we try to add (vertices shown in red). The triangle on the left is the result of snapping the top-right line to the bottom line.

It looks like the bottom-right vertex of the line was snapped to the top-left vertex of the existing edge. It is surprising because the distance between those two vertices is ~ 0.3 (higher than the tolerance).

Alright so going on what happens is that the result of snapping is noded again with the existing edge so that the line being inserted becomes 2 lines (one matching the top-segment of the existing edge and another one describing the other two sides of the triangle) and then a new snap happens, to the now intersecting _nodes_.

We have a single node here so far, which is the top-right vertex of the existing edge (where the arrow ends).

As expected, given the distances between the horizontal vertices, snapping of both segments to the existing node results in two collapses: the horizontal line becomes a point (the node) and the triangle portion becomes a single line going back and forward.