Connect closest node instead of first node below threshold in polygons.
Filter out spurious vertices in polygons boundaries.