Easy to happen, did something similar following another rider into a circle, he slowed, looked left, saw opening and started accelerating. I looked left, saw opening and started accelerating. When I looked forward he had changed his mind and stopped.
I was lucky to be on a different line and cruised pass him, but it was close. Looking back if I was not trying to stay with the group probably would have stopped and waited for next break in traffic.
Hopefully you and the other rider did not get hurt.
Rick