In class net.sf.saxon.sxpath.XPathEvaluator(), the method createPattern() fails if the pattern is positional, for example a pattern such as *[position()=last()]. The compilation of the pattern fails with the message "context item is undefined". This method is called by the s9api XPathCompiler.compilePattern()
This code is not used directly by Saxon so it will only affect applications (e.g Calabash) that call createPattern() or compilePattern() directly.
A patch for the 9.1 branch is being placed in Subversion.