Fix a bug where duplicating a file multiple times would delete the previous duplicates
Issue: Create a new folder with a single file. Copy and paste the file multiple times -> chaos ensues.
This is a regression introduced by !138 (merged).
Edited by Sergios - Anestis Kefalidis