(1) Where a defendant is charged with an attempt to commit an offence and the evidence establishes the commission of the actual offence he or she may be convicted of the attempt, and punished accordingly.
(2) A defendant convicted under subsection (1) of attempting to commit an offence shall not be liable to be prosecuted again for the same offence for which he or she was charged with attempting to commit.