gpg: Improve check for ambiguous keys.