Moved creation of a valid RDF into query.invoke