Bugfix - Blocks are now closed when appropriate.

Previously blocks were not being closed all the time. The result
was a very deep text block tree that displayed far more nodes than
expected when querying for tags.