public List<CompiledPlan> apply(CompiledPlan plan) {
ArrayList<CompiledPlan> retval = new ArrayList<CompiledPlan>();
AbstractPlanNode planGraph = plan.fragments.get(0).planGraph;
planGraph.calculateDominators();
List<AbstractPlanNode> receiveNodes =
planGraph.findAllNodesOfType(PlanNodeType.RECEIVE);
for (AbstractPlanNode pn : receiveNodes) {