Debian loader sometimes thinks a package has been loaded when it has not
The Debian loader keeps a cache of already loaded packages in its database, after loading them, to avoid doing the work again.
There seems to be a race condition: some Debian origins have snapshots with a branch pointing to a revision that doesn't exist in the database.
Investigate and fix.
Migrated from T997 (view on Phabricator)