diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index d8c5dd3..16f807f 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -342,11 +342,11 @@ standard_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
 	 * actually a safe thing to do.  (Note: we assume adding a Material node
 	 * above did not change the parallel safety of the plan, so we can still
 	 * rely on best_path->parallel_safe.  However, that flag doesn't account
-	 * for initPlans, which render the plan parallel-unsafe.)
+	 * for subplans, which render the plan parallel-unsafe.)
 	 */
 	if (force_parallel_mode != FORCE_PARALLEL_OFF &&
 		best_path->parallel_safe &&
-		top_plan->initPlan == NIL)
+		glob->subplans == NIL)
 	{
 		Gather	   *gather = makeNode(Gather);
 
