Thank you for the comprehensive bug report. Why should it clear the local key? The local key is just a key for that client instance, it's not related to your identity, no?