Translations:Extension:Scribunto/Lua reference manual/8418/en

If it is necessary to use $1 on the main loop, simply declare a variable which is checked each time the inner loop completes, and set it when necessary.