This is going to be tricky...
One needs to understand that what's going on here should not be viewed as a bug, you're inside an identifier, $iif, it is normal behavior for $iif to evaluate the 'iftrue' parameter of $iif.
Of course, this has nothing to do with $iif, all identifiers will behave the same way (more or less).
I'm afraid mIRC is now getting it correctly, you can use $iif(%test == $null,set % $+ test test) if you want to set the variable inside $iif.
Note that $iif is a super slow identifier anyway, as it's calling /if internally, the proper, and therefore much faster way to do a condition and set a variable accordingly is what you did in the test3 and test4 alias.
There still might be some concern though, because $iif(1,% $+ test = 1) executed as a command sends %TEST to the server, it does not set, whereas $iif(1,set % $+ test 1) will set correctly, probably related is that $(%a = 1) used to return "set %a 1", and no longer does (return "= 1"), which should never be an issue in itself.