(1) This section applies to a criminal proceeding (including a proceeding on appeal) in which a court has—
(a) made a sentence-related order that is contrary to law; or
(b) failed to make a sentence-related order that is required to be made by law.
(2) This section applies whether or not anyone has been convicted or found guilty of an offence in the proceeding.
(3) The court may reopen the proceeding (on the application of a party to the proceeding, or on its own initiative) and may, after giving the parties an opportunity to be heard, do either or both of the following:
(a) make a sentence-related order that is in accordance with law;
(b) amend any relevant finding of guilt, conviction, sentence or order.
(4) For this section, the court may issue a warrant for the arrest of a person charged in the proceeding if—
(a) the court considers that the person will not appear unless the warrant is issued; or
(b) the person fails to appear when the court calls on the person to appear.
(5) For an appeal under any Act against a sentence-related order made under this section, the time within which the appeal must be made starts on the day the order is made.
(6) However, this section does not otherwise affect any right of appeal.
(7) In this section:
"sentence-related order"—
(a) see section 55 (Application—pt 4.4); and
(b) includes an ancillary order within the meaning of
section 58 (Ancillary orders relating to offences taken into account in
sentencing).