In g10/mainproc.c, the function proc_pubkey_enc has this comment:
/* FIXME: Store this all in a list and process it later so that we can prioritize what key to use. This gives a better user experience if wildcard keyids are used. */
Indeed. The c->dek should be filled in the function proc_encrypted choosing the best key.