More fixing up of BetterDOMDocument