[BUGFIX] Fix error in filelist after deleting file with broken refs