Thanks for your bug report and the test script. Variables are parsed in a different way, and at a different point, in the script parser than command prefixes. This behaviour has been in place for as long as I can remember. Changing where and how command prefixes and/or variables are parsed after all these years would introduce side-effects and/or break existing scripts. As you have found, the solution is to specify the prefixes at the start of the command line.