Fixes 'parent is undefined' exception in DomParser.js