SWITCHYARD-1627 Fix DOMSource creation for documents