Profile testdriver and refactoring

Yes, i can rewrite the function to create a copy rather than modifying the original and use project. Is this what you mean? 
I could also use remove-keys, but I saw http://www.jsoniq.org/docs/JSONiq/html-single/index.html#idm19630896 that the test was failing and skipped that.