A T_WHITESPACE token cannot technically exist after the last closing tag, only "whitespace" in the form of one or more T_INLINE_HTML tokens.
Fixed "whitespace" search after last closing tag.
Thanks for the patch. I did have to make some minor changes. You can see them here: 64a8c83
Yeah. Yours is cleaner. Good job. :-)