Show only one dialog when failing to import keys
(cherry picked from commit 50667eee4d8d3642cc01c6f108ca3365257c2ca2)