Can we store this flag in the Analytics object itself? Firstly, it might simplify the code. Secondly, suppose the exception happened in Settings, and you'll just cause it again.