The stripping of multiple spaces is not a bug, but intentional. There have been many posts regarding multiple spaces. mIRC also does not allow leading or following spaces. There are ways around this, most notably, using a 3rd party dll called spaces.dll

mIRC recognizes two characters for variable names, depending on the type of variable that you're wanting/needing to work with.

The most common one is the local/global variable (local variables are set using /var, global variables are set using /set). If the % character isn't present, then mIRC doesn't know that it's a variable.

I find it interesting that I can use
Code:
//set -s $+(%,a,b) 1
and it works properly, yet your example does not.

Note: If, for some reason, you must use a local variable, you can set it using the /set command and the -l switch. This method does work as a workaround for the second bug you posted.