We have to migrate from Saxon 8 to Saxon 9 B. In the XSLT code we use Java HashMap classes for caching purposes.
In Saxon 8 we could put an XSLT node into the hash list and retrieve its value afterwards. However, if try this on Sasxon 9 B I get as result: net.sf.saxon.tinytree.TinyElementImpl@1ae04000
Below you find a small test program to reproduce this effect (Note: the same mechanism works for simple types):