((VirtualNodeSet) contextSet).setSelfIsContext();
((VirtualNodeSet) contextSet).setSelfIsContext(); ((VirtualNodeSet) contextSet).setContextId(contextId);
	protected Sequence getSelf(XQueryContext context, NodeSet contextSet) {		if(test.isWildcardTest()) {            if (nodeTestType == null)                nodeTestType = new Integer(test.getType());   			if (Type.subTypeOf(nodeTestType.intValue(), Type.NODE)) {				if (Expression.NO_CONTEXT_ID != contextId) {					if (contextSet instanceof VirtualNodeSet) {						((VirtualNodeSet) contextSet).setInPredicate(true);						((VirtualNodeSet) contextSet).setSelfIsContext();                                         } else if (Type.subTypeOf(contextSet.getItemType(), Type.NODE)) {						NodeProxy p;						for (Iterator i = contextSet.iterator(); i.hasNext();) {							p = (NodeProxy) i.next();							if (test.matches(p))								p.addContextNode(contextId, p); 						}					}				}				return contextSet;			} else {				VirtualNodeSet vset = new VirtualNodeSet(axis, test, contextId, contextSet);                vset.setInPredicate(Expression.NO_CONTEXT_ID != contextId);				return vset;			}		} else {            			DocumentSet docs = getDocumentSet(contextSet);		    NodeSelector selector = new SelfSelector(contextSet, contextId);            ElementIndex index = context.getBroker().getElementIndex();            if (context.getProfiler().isEnabled())                context.getProfiler().message(this, Profiler.OPTIMIZATIONS,                         "OPTIMIZATION", "using index '" + index.toString() + "'");            		    return index.findElementsByTagName(ElementValue.ELEMENT, docs, test.getName(), selector);		}	}