Ambient occlusion will be disabled when changing gamma if you have ambient occlusion enabled in the first place.
With ambient occlusion on, going to the video settings and changing gamma will disabled ambient occlusion.
Trying to re-enable ambient occlusion does nothing, and you have to change Overall Quality to be able to enable Ambient Occlusion again.