When performing a keylist with GPGME_KEYLIST_MODE_EXTERN, if the keyserver returns
a key id that is greater than 8 digits, the key id will be blank.
The draft of "HTTP Keyserver Protocol" states in section 5.2:
<keyid> = this is either the fingerprint or the key ID of the key. Either the 16-digit or 8-digit key IDs are acceptable, but obviously the fingerprint is best. A keyserver should use the most specific of the key IDs that it has available. Since it is not possible to calculate the key ID from a V3 key fingerprint, for V3 keys this should be either the 16-digit or 8-digit key ID only
I have narrowed down the cause to this line:
Attached is a simple patch that works around the issue, albeit, in a not very well
tested or overly informed fashion - so it may need some reform.
Patch is against HEAD of master.