Defend against rare Security exception seen on some devices.