Try having two seperate nodes for add to viewport, its likely trying to add both even tho only one execution path was followed, i should have tested that bit in the code i threw together to show you, but i was mostly trying to show off the switch statement