Updates layer.visible too.