Controller patch

Check for TOC/Legend/LayerControl and only populate custom LayerInfo
arrays if widget will be loaded.