Fix bug when reloading the database

Now instance maps are correctly reset when file is rescanned (but this should not happen in the final product)