((BindingExpression)returnExpr).analyze(this, flags, orderBy);
((BindingExpression)returnExpr).analyze(this, flags | SINGLE_STEP_EXECUTION, orderBy);
    public void analyze(Expression parent, int flags, OrderSpec orderBy[]) throws XPathException {        // Save the local variable stack		LocalVariable mark = context.markLocalVariables();				inputSequence.analyze(this, flags);				// Declare the iteration variable        LocalVariable inVar = new LocalVariable(QName.parse(context, varName, null));        inVar.setSequenceType(sequenceType);		context.declareVariable(inVar);				// Declare positional variable		if(positionalVariable != null) {			LocalVariable posVar = new LocalVariable(QName.parse(context, positionalVariable, null));            posVar.setSequenceType(POSITIONAL_VAR_TYPE);            context.declareVariable(posVar);        }        		if(whereExpr != null) {		    whereExpr.analyze(this, flags | IN_PREDICATE | IN_WHERE_CLAUSE);		}		// the order by specs should be analyzed by the last binding expression		// in the chain to have access to all variables. So if the return expression		// is another binding expression, we just forward the order specs.		if(returnExpr instanceof BindingExpression) {		    ((BindingExpression)returnExpr).analyze(this, flags, orderBy);		} else {		    // analyze the order specs			if(orderBy != null) {			    for(int i = 0; i < orderBy.length; i++)			        orderBy[i].analyze(this, flags);			}			returnExpr.analyze(this, flags);		}				// restore the local variable stack		context.popLocalVariables(mark);    }