Ensure unmatched fragments are closed.

If a fragment has no match for either endpoint, it should be included as a closed ring.  Previously, it was not being closed.