Fix #861

See #861.

We need to do something about the namespaceURI and localName though. htmlparser2 doesn't provide this at all.

We could derive them ourselves by going up the domtree of each element and checking if there's a namespace defined (maybe use prototype chain for performance improvement?).
We could also set them directly from the parser (which htmlparser2 doesn't currently support), but that'd also entail node reordering issues and there's no public API to directly set these from so we'd have to reference our own "private" variables a bit (not that bad though).

In short the current state of affairs is bad but at least the regression is fixed.