I found that the state variable needed to be cleared for other cases too, so in fact I do it for all scene phase changes, with just a check to see if the flag is actually set before resetting it. This then works for the case of when the app is put into the background using the home button. Unfortunately, it doesn't seem to work for the case of when the app is suspended using the lock button.