I have logged in a bug with ESRI.
Here are some screenshot examples:
01. Layer List on Application Load
Now if I toggle back to the layer list, then turn off both web services in the layer list, the symbology will change for the base map service when I toggle back to the legend. ESRI has duplicated this behavior using their data. The behavior is inconsistent. Notice the incorrect symbology for the Base Map service shown below:
There are line and polygon features for the base map that show point features from the GPS layer.
The LayerList/Legend in JS API 3x has better functionality. Hopefully, other people have encountered this issue. This should be resolved, because having a functioning layer list with legend is crucial for our applications. If the symbology changes, then end users will notice and the application is not functional.
Finally, here is the code I use for the layer list widget and legend in the 4x environment:
Thank you for the review.