I've had this bug before when using Upload Wizard, but I couldn't reproduce it, so I left it there. I've just come across the same bug again, so here are the steps to reproduce it. 1) Upload an image and give it a file name "somename1.jpg" 2) When populating categories, enter a category that doesn't exist 3) Publish the page ignoring the warning pop-up by clicking OK 4) Click on Upload more files 5) Upload a different image 6) Give it (accidentally) the same name "somename1.jpg" Right there is the bug! Upload Wizard does not recognize this file name as a duplicate. When you proceed to publish it, instead of reporting the error, the process continues and the second image overwrites the first image on the previously published page. I've reproduced the bug using the steps, and here's the result: https://commons.wikimedia.org/wiki/File:Wikimedia_Upload-Wizard-Bug-Test_2017-11-07.jpg
Yeah, I'm not sure about that part (it might be not significant, or it might be just something with the warning pop-up rather than the specific warning about categories), but everything else sounds plausible. UploadWizard probably caches the results of looking up file existence somewhere internally, and does not update this when uploading a file.
I've just performed a test with entering an existing category this time. That part is actually not significant, so it does not matter whether or not a category exists. Here's the resulting page: https://commons.wikimedia.org/wiki/File:Wikimedia_Upload-Wizard-Bug-Test_2017-11-07_(3).jpg
So, here are the steps to reproduce the bug. 1) Upload an image 2) Give it a file name/title "somename1.jpg" 3) Publish the page 4) Click on "Upload more files" 5) Upload a different image 6) Give it (accidentally) the same file name/title "somename1.jpg" 7) Publish the page. Due to the bug, the second image overwrites the first image on the first published page. The second page is never published.