Referenceprefix manager: Fixed KeyError when repository is already removed.