XQConnection.getStaticContext() doesn't make a copy
The Saxon XSLT and XQuery processor, developed by Saxonica
Brought to you by:
mhkay
The methods XQConnection.getStaticContext() and XQConnection.setStaticContext() are supposed to make a copy of the properties of the static context; instead the Saxon implementation merely stores or returns a reference to the XQStaticContext object supplied, which means that subsequent changes to that object are more pervasive than they should be. A patch is being committed for the 9.2 branch.
Fixed in 9.2.1.2