Moved hidden switch protection checks 1 level down.