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

suse-commit: ca00d54d1a5ab705513a3f0923c4c25375abe0c9