The Department of Corrections is fighting against a compensation payout to prisoners who were held in jail for too long because of a misinterpretation of the law.
In September 2016, the Supreme Court ruled that time in prison had to be calculated from the point of arrest, even if other charges were laid later.
Today in the Court of Appeal, Department of Corrections lawyer Daniel Perkins has laid out his case against paying out compensation, at times being closely questioned by the panel of justices.
Perkins argued that while the Supreme Court decision could retrospectively apply to prison sentence length, it shouldn't be used to apply for compensation for those same past cases.
He said that the judgment was clear on the result for sentence lengths, but it deliberately made no mention of civil liability for compensation.
"What we're talking about here is opening a retrospective civil liability for a not-insignificant number of prisoners, who may have been detained for not-insignificant periods of time.
"It's fairly clear from my friend's submission that we while may be talking about small-ish amounts of time, maybe 30 days, and small-ish amounts of money, there are potentially much wider implications from other litigants who are likely to see the outcome of this litigation.
"So, in terms of unfairness, there is a cost to the taxpayer associated with this.
"The collective civil liability that is opened up by this outweighs the individual harm to individuals who have experienced a period of unlawful detention, that was undertaken in good faith."
Justice Forrest Miller told Perkins he was putting forward a "bold argument".
Perkins simply answered, "I accept that".
Former prisoner Shane Arron Gardiner is fighting the Department of Corrections case.
Following the Supreme Court ruling, in August 2017 Gardiner was awarded $10,000 for being held in prison for an extra month.
His lawyer, Douglas Ewen, said the law deliberately allowed for compensation for false imprisonment because of the mental hurt and distress it caused.
He said it didn't matter that Corrections was acting in good faith when the inmates were imprisoned.
"If there was proof of bad faith, then the damages [compensation] would go through the roof. But if this is in good faith, then it must be a neutral factor."
Ewen said just releasing inmates from prison wasn't enough to make up for people being in prison longer than they should have been.
The Court of Appeal Justices have reserved their decision.
At the time of the 2016 Supreme Court ruling, Corrections estimated it could affect around 500 inmates that it was holding in custody.
That wouldn't include any other prisoners who were affected by the sentence miscalculation, but had already been released.