**BUG**
Concise problem statement:
When changing layer colors in the layer settings dialog, it sometimes causes the top and bottom layer to vanish from the layers tool palette. It does not happen all the time, but only some of the time. Refreshing the page restores normal operation.
Steps to reproduce bug:
1. In layer toolbar, click on settings. Change the color of a layer.
2. Close settings dialog.
3. Repeat several times until the top and bottom layer disappear from the layers palette.
Results:
Sometimes the top and bottom layer are no longer visible in the layers palette.
Expected results:
Browser: