Shouldn't the MaterializedScanPlanNode's direction be asserted rather than queried?