KEYS: Fix stale key registration at error path (bnc#908163).

suse-commit: a49cb11aaba18c059900746ee7e306510024ecac