Fixes #1646
Fixes #1650
Companion part for #1646
Conflicts:
	companion/src/modeledit/logicalswitches.cpp