Fix the case where there is no tagName and node_type != 3

This happens when you paste from Microsoft Word and get weird HTML (with inline XML, comments, etcetera).
Now PR on the right branch :smiley: