Make this play nice with our new BetterDOMDocument class