When you replace an image on an existing image, the caption of the existing image gets removed and is unable to recover, even when cmd-z.