Insert the barrier after the last _executed_ copy, not the most recently inserted copy. This fixes https://github.com/llvm/llvm-project/issues/91205.
Insert the barrier after the last _executed_ copy, not the most recently inserted copy. This fixes https://github.com/llvm/llvm-project/issues/91205.