Issue #3380414: Fix bug with already deleted file showing up after deleting all files and adding a new one again
Closes #3380414