Fixes #13265 - Ignore all nodes except for: element, document fragment and document