batch-rename: Fix issue with renaming files with same name
Fix for #2144 (closed)
It's possible that this issue is fixed in !575 but that's a much bigger architecture change. Haven't had a chance to test that MR, and it's starting to diverge from the current code base anyways.