When the XSLT declaration saxon:script is used to establish an association between a namespace URI and a Java class, this association is held in static data for the Java VM, affecting and overwriting any associations that might be established by other stylesheets compiled concurrently in the Configuration.
This problem will not be fixed. The saxon:script element is deprecated and will be withdrawn in the next release.
Bindings between namespace URIs and Java classes implementing extension functions should be established at the level of a Configuration. This can be done by calling Configuration.getExtensionBinder("java"), casting the result to a JavaExtensionLibrary, and then calling declareJavaClass().