You've lost this functionality in your changes. In secure mode, when the camera is closed, we need to forget all of the photos we have. This is a privacy feature, so that users who don't know the passcode can't see private photos previously taken by the phone's owner.