Fixes bug where the presenting layer on rotation could partially appear atop presented layer when dismissing the presented layer