bakery: more intelligent prefix handling for PublicKeyRing