Fix #1457 "NPE in URLGenerator when using XSLT doc() or document() function to perform an HTTP request"