At the end of the movie, in the lab, the power goes out and a shootout ensues. During the shootout, henchman Wiley accidentally shoots his boss, Michael Drucker, in the stomach. Remember this as moment A.
From this point, they have to get the power back on so they can clone Drucker. The wounded Drucker sends his people out to kill Arnie and get the power back. Before they go, he calls Wiley back, shoots him dead, and says not to clone him ever again. Some generic Sci-Fi action ensues, and eventually the power comes back. Drucker scans his brain, and starts a new clone with the new scan. Remember this as Moment B.
Now, when the new clone wakes up, he lurches up and screams something like, "WILEY, YOU SHOT ME!", moment A. But the brain scan, moment B, happened LONG after Wiley shot him, and he had even killed Wiley. The clone SHOULD have said something like, "Ok, now the brain scan is done." Whoops.