Fix cases where a registry is not updated

If a registry already knew about a package, but didn't know about newly
published version of a package, then the registry would occasionally not be
updated when it otherwise needed to be.