This sounds like a similar issue in this post: Using an If statement in an email template - #34 by Rich_Miller
There could be a bug in email templates that prevent users from using variables inside if statements. I’m going to tag this topic to the engineering ticket so they are aware that it is affecting you as well.