Nice work, I will download the patch and test it, thanks!!!
Edit
I'm thinking about parsing: using namespace statement like:
ParserThread::ParseBufferForNamespaces
I personally think: we can hold these information when we doing the batch parsing, so, these information can be directly retrieved from the Tokentree.
Any body can understand my idea??, sorry if I'm not explain well.