fix layer tree init if visibleLayers is empty