always return array of layers.
Ugly hack to prevent the constant resetting of the TOC. This makes sure that hiding and showing of the toc window doesn't reset it (so checkbox states are preserved)