Guard updateLayer for deleted windows
When a window is deleted it all "set" operations should no-op.
As for the bug specifically, we have an effect that keeps the desktop alive. If a user calls showDesktop not only do we not update the stacking order, we also call updateLayer when the client closes this is after the window is in the deleted state.