Fix CUDA_KERNEL_LOOP from @blackball