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

suse-commit: f780b604c232f6c8567dec657ec8eb2b975e1ccd