The simple FOR command with wildcards begins iterating files before it finishes reading the entire directory. It buffers a block of files and iterates them, then picks up where it left off. When you rename a file, the renamed file may sort later in the list, and be picked up in a later block of files. Hence the double renaming.
In my opinion this behaviour is due to compatibility reasons of the FCB structure of CP/M, but I'm not sure.
Does anybody know an other reason and has a link to a technical description?
Thanks for reading