Don't include the root element when calling Element#getElementsByTagName

Fixes #4249