I think I remember running into this when using the #VAR syntax for writing to variables. I fixed that by including the class name in the command...
#VAR varName <value> <defaultValue> <class>
If you don't want to deal with that, I think the syntax of
varName=<value>
doesn't suffer from the problems you described.
..... I think. ;)
Wil
Wil Hunt