The simple match won't work, like in the following case

<body>
<p>...<p>...
</body>

it will trigger the parentTag match on the first <p>, as stream found the closest close tag from the current position is </body> which meet with the current parentTag <body>, and as it also triggered activeTag match (which performed popElement() already), then after two times of popElement(), the parentTag will be documentFragment. 
When the stream comes to the second <p>, as the parentTag is documentFragment and never match the closest close tag </body>, there is always a warning raised for unmatched <p> and </body>.

Then my solution is to match just the next tag in the stream, so I need to play with the steam to locate that token. In that case, the first <p> tag won't trigger the parentTag match, but the second <p> tag will.