the person may apply to the court under section 180 of the Criminal Procedure Act 2011 to be re-sentenced, and that section applies, with any necessary modifications, as if the sentence that had been imposed was one that could not by law be imposed; and