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