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

suse-commit: bf7d9a80a142e998d6c23ee835b6b3c3afae4145