If this were the case, they would provide him immunity in exchange for cooperation in prosecuting up the "food chain" like they do with mobsters.
I'm just saying that they have a way out, and it seems that they've made the judgment that the potential of finding other criminals (if that's even a motivation) for them is not worth it. And the courts are making the downside "indefinite prison", which isn't much of a downside for the prosecutor.
I think you can expect this to be used far more broadly if this is allowed. If I were a prosecutor I'd probably abuse the power too as yet another lever to use to get my way.
Immunity can mean being convicted for lesser offenses, or negotiating a less than maximal punishment.