That’s a rather special problem with the way how mkgmap evaluates tags. Each rule needs at least one clause that checks a tag for existance (a=) or against a value like with a=xyz or a > 2 or a ~'[0-9]’ . Functions don’t work, a!=xyz also doesn’t work.
I’ve never tried to understand the details behind that.