Updated XPath evaluator for the new AST.

This is still a bit of a hack. Then again, it already was a hack to begin with.