Merge "Keyguard: fix possible divergent state" into pi-dev