[PATCH v3 2/4] cmd: added support of for loop's rare var names (%%1), fixed expansion of outer var loop name inside inner loop