
227 Cal.App.3d 37 (1991)
277 Cal. Rptr. 615
THE PEOPLE, Plaintiff and Appellant,
v.
JAMES THOMAS MINOR, Defendant and Appellant.
Docket No. A049813.
Court of Appeals of California, First District, Division Five.
January 29, 1991.
*39 COUNSEL
John K. Van de Kamp, Attorney General, Richard B. Iglehart, Chief Assistant Attorney General, John H. Sugiyama, Assistant Attorney General, Stan M. Helfman amd Thomas A. Brady, Deputy Attorneys General, for Plaintiff and Appellant.
Steven Fama, under appointment by the Court of Appeal, for Defendant and Appellant.
OPINION
KING, J.
In this case we hold that the rule that a criminal defendant must be advised that commitment following a plea of not guilty by reason of insanity (NGI) may exceed the maximum possible term of imprisonment for the underlying crime is retroactive. If, at the end of the maximum term, an unadvised defendant remains a danger to others, the proper procedure is to seek civil commitment pursuant to the Welfare and Institutions Code. We further hold that a defendant's failure to raise the issue of his lack of advisement when previous extension petitions were filed does not constitute a waiver, since it provided him no advantage, but rather increased the length of his commitment.
The Attorney General appeals from an order granting James Thomas Minor's petition for writ of habeas corpus.
On June 12, 1979, Minor, who had been charged with homicide, firearm use and two priors, withdrew his guilty plea and entered a plea of not guilty by reason of insanity. He submitted the issues of his sanity and the degree of the homicide on the preliminary hearing transcript and two medical reports already on file. Minor admitted the use allegation and the district attorney struck the priors. The court repeatedly told Minor his maximum term of incarceration  in either prison or a state hospital  would be nine years for second-degree murder or six years for manslaughter. On June 15, the court found Minor not guilty by reason of insanity of voluntary manslaughter and committed him to Atascadero for six years.
*40 On December 21, 1988, the district attorney filed a petition to extend Minor's commitment for the fourth time (Pen. Code, § 1026.5, subd. (b)). There followed numerous continuances, a stipulation to extend commitment from June 17 to October 1, 1989, and a suspension of proceedings for psychiatric evaluation. On December 22, 1989, Minor filed a motion to dismiss the extension petition on the grounds he had not been advised of the full consequences of his plea. On December 27, he filed a petition for writ of habeas corpus on the same grounds. After a consolidated hearing, the trial court granted the writ and ordered Minor released.
(1) In People v. Lomboy (1981) 116 Cal. App.3d 67, 68-69 [171 Cal. Rptr. 812], the court held a defendant must be advised that commitment following a plea of not guilty by reason of insanity may exceed the longest possible term of imprisonment for the underlying crime. The Attorney General claims Lomboy is inapplicable to this case for two separate reasons.
First, Minor did not raise the issue of the infirmity of his plea for five and one-half years after the end of his original term of commitment, during which period it had been extended three times. In In re Ronald E. (1977) 19 Cal.3d 315, 321 [137 Cal. Rptr. 781, 562 P.2d 684], the court held a defendant had waived his right to raise the issue of improprieties in proceedings resulting in detention which he had accepted without timely challenge. One cannot, the court explained, "resort to habeas corpus proceedings as a substitute for his failure to take expeditious appeals, absent special circumstances constituting an excuse for such failure." (Id. at p. 322, citation omitted.)
In People v. Superior Court (Wagner) (1989) 210 Cal. App.3d 1146, 1150-1154 [258 Cal. Rptr. 740], the court applied the principles enunciated in Ronald E. and held defendant had waived the defect in his NGI plea (lack of advisement of consequences) "by his unexcused delay in challenging that plea until he reaped the full benefit of preferable hospital confinement and avoided the possibility of prison and attendant parole period." (Id. at p. 1149.) In In re Robinson (1990) 216 Cal. App.3d 1510, 1514-1515 [265 Cal. Rptr. 574], the court distinguished Wagner and found no waiver where defendant's failure to raise the issue at his first extension hearing served to increase his sentence rather than to create a tactical advantage, and where he testified he was unaware of the basis for challenging his plea.
This case is similar to Robinson in that Minor testified he was not told nor was he aware of the consequences of his plea until his first extension hearing, after which the lengthy delay in raising the issue only increased his time in custody. There was no waiver.
*41 (2) Second, the Attorney General maintains the "Lomboy rule" is not retroactively applicable to a plea entered on June 12, 1979. In People v. Superior Court (Bannister) (1988) 203 Cal. App.3d 1525 [250 Cal. Rptr. 909], the court held Lomboy did not apply retroactively to a 1980 plea. In People v. McIntyre (1989) 209 Cal. App.3d 548, 554, 558 [257 Cal. Rptr. 271], the court rejected Bannister's reasoning and held Lomboy retroactive to September 28, 1979, the effective date of Penal Code section 1026.5, subdivision (b).[1] The logic of McIntyre, however, leads inexorably to an earlier date.
"To summarize: 10 years before Lomboy its decision was foreshadowed by People v. Redmond [(1971) 16 Cal. App.3d 931 (94 Cal. Rptr. 543)]. Seven years before Lomboy, People v. Vanley [(1974) 41 Cal. App.3d 846, 855-858 (116 Cal. Rptr. 446)] required that an advisement indistinguishable from Lomboy's be given. Three years before Lomboy the California Supreme Court approvingly noted this Vanley advisement and the fact that trial courts were giving it. (People v. Wetmore [(1978) 22 Cal.3d 318, 322, fn. 2] [149 Cal. Rptr. 265, 583 P.2d 1308].)" (People v. McIntyre, supra, 209 Cal. App.3d at p. 557.)[2]
In light of this history, the McIntyre court rejected Bannister's analysis of the Tahl retroactivity criteria (203 Cal. App.3d at pp. 1529-1530),[3] concluding, "The purpose of the Vanley-Lomboy advisement is to ensure fundamental fairness. If an accused, aware of his risked liberty, pleads NGI that is fair. But if an accused, ignorant of his risked liberty, is allowed to plead NGI, that is unfair. To tolerate such unfairness is incompatible with basic notions of due process. [¶] Secondly, as we have discussed, there has been negligible `reliance upon the old rule,' at least since the 1974 Vanley mandate. *42 And thirdly, for these reasons, there would be scant if any adverse effect upon the administration of justice to apply Lomboy retroactively." (People v. McIntyre, supra, 209 Cal. App.3d at p. 558.)
Then, without transition or explanation, the court "therefore" held Lomboy retroactive to the effective date of section 1026.5, subdivision (b),[4] despite the fact that the most logical conclusion of its reasoning is that Lomboy is retroactive to the date of Vanley (Sept. 18, 1974), or, in effect, that the so-called "Lomboy rule" is really the Vanley rule.
For two reasons, the Attorney General maintains the date of the Vanley opinion is not an appropriate one from which to recognize the right of a defendant who enters an NGI plea to be advised of the possibility that he may be committed to a state hospital for life.
First, the Vanley court's discussion of this point is said to be "pure dictum" since it had "already decided" the defendant's NGI plea must be set aside because it was not personally entered. (41 Cal. App.3d at pp. 854-855, citing Pen. Code, §§ 1016-1018.) In fact, although the awareness-of-consequences issue was discussed after the personal-entry-of-plea issue, it received longer and more detailed treatment. While a footnote in Vanley suggests that court considered the statutory insufficiency of the insanity plea to be its ratio decidendi (id. at p. 858, fn. 10), other courts, including the California Supreme Court, have treated the Vanley advisement requirement as at least an alternative ground for the decision. (People v. McIntyre, supra, 209 Cal. App.3d at pp. 556-558; People v. Wetmore, supra, 22 Cal.3d 318, 322, fn. 2.) "When an appellate court bases its decision on alternative grounds, none is dictum." (Greyhound Lines, Inc. v. County of Santa Clara (1986) 187 Cal. App.3d 480, 485 [231 Cal. Rptr. 702], citation omitted.)
Second, the Attorney General maintains the Vanley court's discussion of the issue "was given content by a statutory scheme which was completely different from the present one. Under the former statutes, an NGI plea subjected the defendant to a lifetime commitment unless the hospital released him or he was able to convince nine members of a jury that he should be released." (Italics in original.) Under either procedure, however, an NGI *43 plea can result in an indefinite commitment in a state hospital, of which the defendant ought to be apprised.
Under the sound reasoning of McIntyre, the rule requiring advisement that a plea of not guilty by reason of insanity may lead to a lifetime commitment  whether designated the Lomboy, Vanley, or Vanley-Lomboy rule  is applicable where, as here, the plea was entered almost five years after the Vanley decision and almost eight months after the decision in Moye which underlay the statutory amendments inexplicably chosen by the McIntyre court to determine the retroactivity date of Lomboy.[5]
(3) Although failure to have given the required advisement precludes extension of a defendant's criminal commitment, the district attorney is not without a remedy should the defendant remain a danger to others. The proper procedure in that event would be to institute civil commitment proceedings under Welfare and Institutions Code sections 5150 et seq.
Since we hold the trial court properly granted Minor's petition for writ of habeas corpus on the basis of a violation of the Vanley-Lomboy rule, we need not address the due process issue of the violation of his plea bargain.
The judgment is affirmed.
Low, P.J., and Haning, J., concurred.
NOTES
[1]  Penal Code section 1026.5, subdivision (b), codified the extension procedures outlined in In re Moye (1978) 22 Cal.3d 457 [149 Cal. Rptr. 491, 584 P.2d 1097], in which the court held at page 460 "that well established constitutional principles of equal protection require that the duration of institutional confinement of [a person committed to the Department of Health following his acquittal of criminal charges because of insanity] cannot exceed the maximum term for the underlying offense, unless the People or other committing authority establish grounds for an extended commitment, as outlined below. After the expiration of such maximum term, as extended, if further confinement and treatment is sought the People must either proceed in accordance with the civil commitment provisions of the Lanterman-Petris-Short Act ... (Welf. & Inst. Code, § 5000 et seq.) or rely upon outpatient supervision."
[2]  Since the Lomboy court itself mentioned Vanley, rejecting the People's attempt to distinguish it (116 Cal. App.3d at pp. 72-73), it is particularly surprising that the court in People v. Superior Court (Bannister), supra, 203 Cal. App.3d 1525, did not even mention Vanley in its discussion of Lomboy's retroactivity.
[3]  The retroactivity criteria set out in In re Tahl (1969) 1 Cal.3d 122, 134 [81 Cal. Rptr. 577, 460 P.2d 449], quoting Halliday v. United States (1969) 394 U.S. 831, 832 [23 L.Ed.2d 16, 89 S.Ct. 1498], are: "`(1) the purpose of the new rule; (2) the extent of reliance upon the old rule; and (3) the effect retroactive application would have upon the administration of justice.'"
[4]  Section 4 of Statutes 1979, chapter 1114, provides, "It is the intent of the Legislature that the provisions of this act which provide for the extension of the commitment of a defendant shall not affect an extension of the commitment of a person ordered prior to the effective date of this act as authorized by the decision of In re Moye, 22 Cal.3d 457." This precludes retroactive application of the new procedural requirements to extensions granted before September 28, 1979, not to commitments made before that date. Otherwise, Minor, whose original commitment was ordered on June 15, 1979, would not be entitled to the very extension proceedings the state initiated in this case. The Legislative Counsel's Digest of Senate Bill No. 1022 (4 Stats. 1979 (Reg. Sess.) Summary Dig., p. 359) notes, "This bill... would state the Legislature's intent with respect to the application of such provisions to persons whose commitment has been extended under case law."
[5]  A possible explanation for the choice of the McIntyre court is that the plea in that case was entered September 19, 1980, necessitating retroactivity no further than September 28, 1979, to resolve the specific issue before the court.
