Fixes newly introduced bug with incorrect handling of nested tags
Merge pull request #2 from arjank/master

Fixes newly introduced bug with incorrect handling of nested tags