In the initial step of undubdivide, the algorithms tags the center
vertex of each subdivided face of the lower level sudibision level.
After that, it checks if the state of the tags is a valid configuration
for building a lower level base mesh. If it is, it starts dissolving the
tagged vertices to start building the new base mesh.
With the following topology, unsubdivide tags the vertices marked with a
blue X. It was considering this set of tags valid, so it was disolving
them and starting the grid extraction.
When disoolving vertex A, that creates a loose edge over the face, so
the untagged vertex B and the edge C were also dissolved. Because of
this, grid extraction was starting with an unexpected topology layout,
making it enter an infinte loop as it was not able to find the corners of
the grids for the new base mesh loops.
This adds and extra rule to the tag state checking that considers these
cases as there is actually no valid lower level mesh to rebuild.