RemoveStageBarrier: code cleanup