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.