if(contextItem != null) contextSequence = contextItem.toSequence();
	public Sequence eval(Sequence contextSequence, Item contextItem) throws XPathException {        		//Profiling for eval		if (context.getProfiler().isEnabled())        {            context.getProfiler().start(this);                   context.getProfiler().message(this, Profiler.DEPENDENCIES, "DEPENDENCIES", Dependency.getDependenciesName(this.getDependencies()));            if (contextSequence != null)                context.getProfiler().message(this, Profiler.START_SEQUENCES, "CONTEXT SEQUENCE", contextSequence);            if (contextItem != null)                context.getProfiler().message(this, Profiler.START_SEQUENCES, "CONTEXT ITEM", contextItem.toSequence());        }        		if(contextItem != null)			contextSequence = contextItem.toSequence();                Sequence result = null;		/* 		 * If we are inside a predicate and one of the arguments is a node set, 		 * we try to speed up the query by returning nodes from the context set.		 * This works only inside a predicate. The node set will always be the left 		 * operand.		 */     		if (inPredicate)		{			if((getDependencies() & Dependency.CONTEXT_ITEM) == 0 && Type.subTypeOf(getLeft().returnsType(), Type.NODE))			{ 			    /*			     * TODO quickNodeSetCompare() is NOT being called for xqueries like -			     * 		collection("/db/CommunityDirectory/data")/communitygroup[validation/lastapproved/date = current-dateTime()]			     * 		collection("/db/CommunityDirectory/data")/communitygroup[validation/lastapproved/date = ("2005-12-20T16:39:00" cast as xs:dateTime)]			     * but is being called for xqueries like - 			     * 		collection("/db/CommunityDirectory/data")/communitygroup[validation/lastapproved/date = "2005-12-20T16:39:00"]			     * 		collection("/db/CommunityDirectory/data")/communitygroup[validation/lastapproved/date = "2005-12-20T16:39:00" cast as xs:dateTime]			     * 		- but due to the string type of the key falls back to nodeSetCompare()			     * 			     * deliriumsky 			     */				if ((getRight().getDependencies() & Dependency.CONTEXT_ITEM) == 0 /*&& (getRight().getCardinality() & Cardinality.MANY) == 0*/) //changed to allow multiple right cardinality into () - deliriumsky				{					if (context.getProfiler().isEnabled())						context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION CHOICE", "quickNodeSetCompare");					result = quickNodeSetCompare(contextSequence);				}				else				{                          if (context.getProfiler().isEnabled())                        context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION CHOICE", "nodeSetCompare");                    					result = nodeSetCompare(contextSequence);				}			}		}		        if(result == null) {            if (context.getProfiler().isEnabled())                context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS,                         "OPTIMIZATION CHOICE", "genericCompare");               result = genericCompare(contextSequence, contextItem);        }                if (context.getProfiler().isEnabled())                       context.getProfiler().end(this, "", result);                return result;	}