Saxon attempts to recognize local variables that are
referenced once only, and in such cases avoids saving
the value of the variable in memory (it allocates a
Closure rather than a MemoClosure). This calculation is
being performed incorrectly, resulting in some
variables being stored in memory unnecessarily.
Affects Saxon 8.6 and 8.6.1.
Source fix: in
net.sf.saxon.expr.RangeVariableDeclaration, delete line
166 (which reads rcount += 10;)
[Not fully regression tested]