protected override QilNode VisitDocOrderDistinct(QilUnary ndDod) {
// DocOrderDistinct applied to a singleton is a no-op
if (ndDod.XmlType.IsSingleton)
return Visit(ndDod.Child);
// Handle any special-case patterns that are rooted at DocOrderDistinct
if (HandleDodPatterns(ndDod))
return ndDod;
// Sort results of child expression by document order and remove duplicate nodes
// cache = runtime.DocOrderDistinct(cache);
this.helper.LoadQueryRuntime();
NestedVisitEnsureCache(ndDod.Child, typeof(XPathNavigator));
this.iterCurr.EnsureStack();
this.helper.Call(XmlILMethods.DocOrder);
return ndDod;
}