Workaround a strange context bug caused by
PreferenceFragment.addPreferencesFromIntent().