Fix loading of depositories for purpose of saving the database

Making a pull request to make sure this doesn't break other things.