Internally Saxon uses an expression called a PositionRange to represent a range of integers, especially when used as a predicate in a filter expression: for example the construct $x is represented by a SliceExpression with a PositionRange as a subexpression. The analysis of a PositionRange (and hence of its containing expressions) is incorrect, in that it decides the expression depends on the context position.
The consequences of such an error in the analysis are difficult to predict or describe accuratly. In the case in question, the consequence was that an expression that expected the value of a variable to be held in a form suitable for indexing found at run-time that this was not the case, and had to convert the value, producing the warning message "*** Base value for indexed lookup is not indexable" to indicate that this situation is one that should never arise. This particular problem occurred in a path that is Saxon-SA only.
A patch to module net.sf.saxon.expr.PositionRange is in Subversion.