public void Sort(QilNode sortKeys) {
if (sortKeys != null) {
// If sorting is required, cache the input node-set to support last() within sort key expressions
EnsureCache();
// The rest of the loop content must be compiled in the context of already sorted node-set
current = f.For(f.Sort(current, sortKeys));
}
}