[FIX] XML Parsing: only cache document if DTD validation is turned off