Exclude from view-layer state is not preserved across multiple nesting levels in the outliner
In the example:
- turn off widget1
- toggle theme off and on again
- turn on widget1
- notice that the collection exclude-state is gone.
Rewrite the implementation of setting the corresponding flags by focusing on maintaining the synced state of those two flags and trying to make complex logic a bit more intuitive.
Regarding the behavior: excluding from view layer works like a one time ad-hoc curtain thrown over the nested items. When unveiling the explicitly chosen state gets restored.