Workaround for NPE in javax.xml.parsers.DocumentBuilder.parse()