Make SetPlanNode.replaceInput set pointer in other direction, too.

The problem shows up with nested unions with conditions, due to the relatively recent handling for moving them around.