This edit https://commons.wikimedia.org/wiki/Special:Diff/309221779 holds the summary line "Imported with FileImporter from …". Technically, this is supposed to be a null edit with no changes, only with this summary line. But it contains two changes: The HTML comment <!--This file was moved here using FileImporter from …--> is added to the top, and the template replacements are made.
The next edit https://commons.wikimedia.org/wiki/Special:Diff/309221781 holds the summary line "Replaced 1 template names with Wikimedia Commons template names".
Reported at T194505#4391840.
Another worst-case example: In http://mwfileimport.wmflabs.org/wiki/index.php?title=File:Stolperstein_f%C3%BCr_Lina_Speiser,_Br%C3%BCckenstrasse_11,_Bad_Cannstatt,_Stuttgart.JPG&curid=105&action=history the summary line "Replaced … template names with … template names" got lost entirely, because the edit was empty (the user did not made additional edits).
- The template replacements must be made in the next revision.
- The summary line should not get lost.
- The HTML comment should also be added in the next revision.
- The null revision should only contain the title change (if one was made).