(1) On a trial on indictment for an offence other than treason or murder, if the jury finds the accused not guilty of the offence charged but the allegations in the indictment amount to or include, whether expressly or impliedly, an allegation of another offence that is within the jurisdiction of the court, the jury may find the accused guilty of that other offence.
(2) For the purposes of subsection (1), an allegation of an offence includes an allegation of an attempt to commit the offence.