Changed XPathContext.rootNode type to NodeWithAncestors instead of Node.