Fixed "DEM in Legend" issue. Now using new REST service endpoint to retrieve legends for all layers.