Fix LogicalPlanningTestSupport.produceLogicalPlan and related tests