AMI: Implement copy_image. (part 4, minor refactor for clarity)