Fix issue #691 with locked visibility settings not working as intended.