Fix DOMSource creation for documents: SWITCHYARD-1627