This seems incomplete. We're relying on a breakage somewhere as a Query Exception else instead of properly throwing a Semantical or Parser exception properly.
I'd say that here we should properly add fields to PathExpression and then evaluating them on processDeferredPathExpressions.