An ArrayIndexOutOfBounds exception can occur in method TinyNodeImpl.isAncestorOrSelf() when the method is applied to the root node of a tree.
A user has reported hitting this condition while executing XSLT code, but it has not been possible to reproduce this. The method is called only while evaluating the key() function, and apparently only when the third argument (which defaults to "/") is not the root of the tree, which is exactly the condition that triggers the exception.
Nevertheless, the internal code is clearly wrong and the bug can be demonstrated by internal interface testing. A patch is therefore being raised in Subversion (module TinyNodeImpl). The source will be fixed on both the 9.1 and 9.0 branches.