core: Do not clobber R_KEY in gpgme_get_key on error.