Fix bug when deleting a project that would probably result in an indexing error in the source list