Calculates the new state after removing a layer. Removes the layer from the main list and the top-level order array.
Calculates the new state after removing a layer. Removes the layer from the main list and the top-level order array.