Helicity transport in a simulated coronal mass ejection