This looks weird to me. It does not allow validating variable names at all and depends of the place where the compiled expression is evaluated