I'll pull this in, but this won't test the code path the way we want it to. The toNumber('7') will get compiled to a literal before it hits you visitLeave for the comparison. You need to use a column reference as the argument. Are you seeing the bug you mentioned for this scenario, or only when the function invocation is on the RHS?