It seems that we create an empty variable collection even though the user deselects that theme. By deselecting they do not want any variables nor collections for that theme to be created.
To reproduce:
Create 2 theme groups: Mode/Light, Core/Default (or anything really), and include some tokens and activate some sets
Go to create variables, and de-select one of those themes from being created
Proceed to create
Expected result: Only the themes that were selected create variable collections
Actual result: All themes create variable collections with the de-selected one being empty
It seems that we create an empty variable collection even though the user deselects that theme. By deselecting they do not want any variables nor collections for that theme to be created.
To reproduce:
Expected result: Only the themes that were selected create variable collections Actual result: All themes create variable collections with the de-selected one being empty