
42 Cal.Rptr.3d 370 (2006)
138 Cal.App.4th 1493
In re ANTHONY C., A Person Coming Under the Juvenile Court Law.
The People, Plaintiff and Respondent,
v.
Anthony C., Defendant and Appellant.
No. C048529.
Court of Appeal, Third District.
April 28, 2006.
*371 Heather J. MacKay, under appointment by the Court of Appeal, Oakland, for Defendant and Appellant.
Bill Lockyer, Attorney General, Robert R. Anderson, Chief Assistant Attorney General, Mary Jo Graves, Senior Assistant Attorney General, Julie A. Hokans, Supervising Deputy Attorney General, Raymond L. Brosterhous II, Deputy Attorney General, for Plaintiff and Respondent.

OPINION ON REHEARING
BLEASE, Acting P.J.
Anthony C. (hereafter Anthony) appeals from the judgment of extended commitment to the California Youth Authority (CYA)[1] pursuant to Welfare and Institutions *372 Code section 1800 et seq.[2] That scheme allows for a two-year extension of a CYA commitment if a jury finds that upon discharge, the ward "would be physically dangerous to the public because of [the ward's] mental or physical deficiency, disorder, or abnormality...." (§ 1801.)
The jury was instructed, consistent with the constitutional requirements of In re Howard N. (2005) 35 Cal.4th 117, 24 Cal. Rptr.3d 866, 106 P.3d 305 (Howard N.) and People v. Williams (2003) 31 Cal.4th 757, 3 Cal.Rptr.3d 684, 74 P.3d 779 (Williams), that to find Anthony physically dangerous within the meaning of section 1800 it must find his mental disorder makes it likely, i.e., "presents a substantial danger," that he will commit future sexually criminal acts.
On appeal, Anthony challenges his order of commitment on the grounds the evidence at trial was insufficient to prove he has serious difficulty controlling his dangerous behavior. He also raises constitutional challenges, errors in the pleadings and at the probable cause hearing, and trial court error involving the admission of prejudicial evidence and the insufficiency of the evidence to support the commitment order.
We agree with Anthony's claim the evidence is insufficient to sustain the charge and shall reverse the commitment order.
In light of this disposition, we requested supplemental briefing on the question whether double jeopardy bars retrial at an extended commitment hearing held pursuant to section 1800. Section 1803 authorizes "[t]he appellate court [to] affirm the order of the lower court, or modify it, or reverse it and order the appellant to be discharged." Section 1801.5 mandates that if trial is ordered for extended commitment, the defendant is "entitled to all rights guaranteed under the federal and state constitutions in criminal proceedings." We read section 1803 in the light of the constitutional principle against double jeopardy and find that discharge is the appropriate remedy.
After considering the parties' arguments and these provisions, we conclude retrial is barred and shall direct that Anthony be discharged from confinement. Because this disposition disposes of the matter, we do not reach Anthony's remaining claims.

FACTUAL AND PROCEDURAL BACKGROUND

A. Original Commitment
Anthony was born in November 1983. He was committed to the CYA as a ward of the court on June 19, 2002, pursuant to section 725, subdivision (b), based upon his admission he committed an act of oral copulation on an eight-year-old girl. (Pen. Code, § 288a, subd. (c).)[3] Additional *373 charges of illegal sex acts with a child under the age of 14 years were dismissed with a Harvey waiver.[4] Anthony entered the CYA's formal sex offender treatment program at O.H. Close Youth Correctional Facility (O.H.Close) on or about October 31, 2002, and remained in the program until institution of the extended commitment proceedings.
CYA jurisdiction was set to expire on Anthony's 21st birthday in November 2004. (§ 1769, subd. (a).) A petition was filed on July 26, 2004, to extend his commitment pursuant to section 1800 and a jury trial was held to determine that question.

B. Extended Detention Hearing
At the extended detention hearing (EDH), Dr. Steven Herskovic, a CYA staff psychologist who worked with Anthony in the sex offender treatment program (the program), testified that the wards in the program are divided into therapy groups of about seven and that Anthony is a member of one of his groups. Dr. Herskovic sees his wards once a week in a three-hour group cognitive therapy session, which is the primary treatment for sex offenders. Additionally, the wards attend several different resource groups involving anger and stress management and issues relating to gangs and drug and alcohol abuse. Dr. Herskovic explained that the primary goal of the program is to prepare the wards so that when they are released from the program, they do not reoffend by committing new sex offenses or any other criminal acts on members of the public.
The program generally takes about 30 months to complete, although some wards take longer and wards who complete the program have a reduced risk of recidivism when compared to wards who do not complete the program.
Progress through the program is measured in stages and phases. The stages, of which there are 10, are the progressive treatment portions of the program. The initial stages stress honesty and self-disclosure. In stages one through three, the wards are oriented into the program, they are required to explore and disclose their entire sexual history, to write victim letters[5] and reverse victim letters to see how they have impacted their victim, and to present these letters to the group and the doctor. In stages four through six, the wards learn about the assault cycle in general[6] and their own assault cycle in particular, including the triggers that affect the various parts of their cycle. In stages seven through nine, the wards learn techniques for intervening into their assault cycle and for relapse prevention. The tenth stage requires that the ward demonstrate leadership by sponsoring new wards and assisting them through the program. By this stage, the ward is expected to be relatively stable and to act as a role model for other wards. Anthony was in stage four and was working on the beginning stages of his assault cycle.
The phases of the program reflect a qualitative assessment of the ward's progression in the program. The ward's placement in a phase is determined from month to month based primarily on his general behavior as well as his participation and performance in treatment and *374 education. Phase one is the lowest phase and the ward's progress through the phases is adversely affected by rule violations. Wards who are performing well in all areas are assigned to phase four, while those who are doing pretty well are assigned to phase three. All privileges are based on the phase attained by the ward and Anthony was in group three.[7]
Anthony was in one of Dr. Herskovic's groups. The doctor prepared a report on Anthony in which he diagnosed him as having pedophilia and attention deficit hyperactivity disorder (ADHD). He defined pedophilia as a mental disorder involving a person over the age of 16 who has an intense attraction to prepubescent children who are five years younger and the individual has acted on those urges. ADHD is a disorder in which the individual has problems with inattentiveness or impulsivity, although Anthony had difficulty with both inattentiveness and impulsive. However, he was taking medication for the ADHD, which made him less impulsive.
As part of a committee at CYA. Dr. Herskovic and others determined that Anthony required more time to complete the program and that an extension hearing was required. Although the doctor did not conduct a formal risk assessment evaluation of Anthony, he opined that Anthony posed a moderate risk of reoffending upon discharge. We shall discuss Dr. Herskovic's testimony in greater detail in part II of the Discussion.
Julian Raya, Anthony's youth counselor, supervised Anthony 40 hours a week for about one year. He described Anthony as nervous, edgy, emotional, generally well-behaved, but a ward who needed to be closely watched. According to Raya, Anthony also had difficulty telling the truth and fabricated one incident which he later admitted was false.
The jury found Anthony "is a dangerous person as defined in Section 1800 of the Welfare and Institutions Code...." On November 23, 2004, the court extended Anthony's commitment to November 2, 2006, and ordered him returned to O.H. Close. Anthony appealed the order of extended commitment.

DISCUSSION

I.

Extended Detention Act
The Extended Detention Act (EDA) (§ 1800 et seq.) provides for the extended civil commitment of persons in the custody of the CYA. (Howard N., supra, 35 Cal.4th at p. 126, 24 Cal.Rptr.3d 866, 106 P.3d 305.) If the CYA "determines that the discharge of a person from the control of the department at the time required by [specified statutes]... would be physically dangerous to the public because of the person's mental or physical deficiency, disorder, or abnormality, the department ... shall request the prosecuting attorney to petition the committing court for an order directing that the person remain subject to the control of the authority beyond that time." (§ 1800.)
The petition must "be accompanied by a written statement of the facts upon which the department bases its opinion that discharge from control of the department at the time stated would be physically dangerous to the public...." (§ 1800.)
*375 If the court determines the petition on its face supports a finding of probable cause, the court must order a probable cause hearing. (§ 1801, subd. (a).) Upon the trial court's finding of probable cause "to believe that discharge of the person would be physically dangerous to the public because of his or her mental or physical deficiency, disorder, or abnormality" (id., subd. (b)), the person is entitled to a jury trial to determine that same question. At the trial, the person is entitled to "all rights guaranteed under the federal and state constitutions in criminal proceedings," including a unanimous jury and proof beyond a reasonable doubt. (See §§ 1801.5, 1801, subd. (b).)
If the jury finds the person meets the statutory criteria, he or she may be committed for up to two years. (§ 1802.) The person may then be recommitted for additional two-year periods following the same procedures outlined ante. (Ibid.)
In Howard N., supra, 35 Cal.4th 117, 24 Cal.Rptr.3d 866, 106 P.3d 305, the California Supreme Court held that to preserve the constitutionality of section 1800, it must be read to require proof "not only that a person is `physically dangerous to the public because of his or her mental ... deficiency, disorder, or abnormality,' but also that the mental deficiency, disorder, or abnormality causes him to have serious difficulty controlling his dangerous behavior." (Id. at p. 135, 24 Cal.Rptr.3d 866, 106 P.3d 305, italics added.)

II.

Sufficiency of the Evidence
Anthony contends the evidence is insufficient to support the verdict because it fails to show he has serious difficulty controlling his dangerous behavior as required by Howard N., supra, 35 Cal.4th 117, 24 Cal.Rptr.3d 866, 106 P.3d 305. Respondent contends substantial evidence supports the jury's verdict. We agree with Anthony.
In reviewing the sufficiency of the evidence in a civil commitment case, we apply the substantial evidence standard of review. (People v. Clark (2000) 82 Cal. App.4th 1072, 1082-1083, 98 Cal.Rptr.2d 767.) The question to be determined is whether, on the whole record, there is substantial evidence from which a rational trier of fact could have found each essential element beyond a reasonable doubt. (People v. Rowland (1992) 4 Cal.4th 238, 269, 14 Cal.Rptr.2d 377, 841 P.2d 897; see also Jackson v. Virginia (1979) 443 U.S. 307, 319, 99 S.Ct. 2781, 2789, 61 L.Ed.2d 560, 573.) We must consider all the evidence in the light most favorable to the People, drawing all inferences the trier could reasonably have made to support the finding. (People v. Rayford (1994) 9 Cal.4th 1, 23, 36 Cal.Rptr.2d 317, 884 P.2d 1369.)
Substantial evidence is evidence that is reasonable in nature, credible, and of solid value. (People v. Johnson (1980) 26 Cal.3d 557, 576, 162 Cal.Rptr. 431, 606 P.2d 738.) While it is the exclusive province of the jury to determine the credibility of a witness and the truth or falsity of the historical facts (People v. Ochoa (1993) 6 Cal.4th 1199, 1206, 26 Cal.Rptr.2d 23, 864 P.2d 103), expert medical opinion evidence that is based upon a "`guess, surmise or conjecture, rather than relevant, probative facts, cannot constitute substantial evidence[.]'" (Lockheed Martin Corp. v. Superior Court (2003) 29 Cal.4th 1096, 1110, 131 Cal.Rptr.2d 1, 63 P.3d 913; Place v. Workmen's Comp. Appeals Bd. (1970) 3 Cal.3d 372, 378, 90 Cal.Rptr. 424, 475 P.2d 656.)
Substantive due process requires that involuntary civil confinement be limited to *376 those who suffer from a mental illness or abnormality causing volitional impairment, which renders the person dangerous beyond his or her control. (Howard N., supra, 35 Cal.4th at p. 128, 24 Cal.Rptr.3d 866, 106 P.3d 305; Kansas v. Crane (2002) 534 U.S. 407, 412-413, 122 S.Ct. 867, 870, 151 L.Ed.2d 856, 862-867 (Crane); Kansas v. Hendricks (1997) 521 U.S. 346, 360, 117 S.Ct. 2072, 2081, 138 L.Ed.2d 501, 514 (Hendricks).) "`A finding of dangerousness, standing alone, is ordinarily not a sufficient ground upon which to justify indefinite involuntary commitment.'" (Howard N., supra, 35 Cal.4th at p. 128, 24 Cal.Rptr.3d 866, 106 P.3d 305, quoting Hendricks, supra, 521 U.S. at p. 358, 117 S.Ct. at p. 2080, 138 L.Ed.2d at p. 512.)
The United States Supreme Court has made it abundantly clear that the distinction between dangerous sexual offenders subject to civil commitment and other dangerous persons who are more properly dealt with through criminal proceedings is constitutionally "necessary lest `civil commitment' become a `mechanism for retribution or general deterrence'  functions properly those of criminal law, not civil commitment. [Citations.] The presence of what the `psychiatric profession itself classified . . . as a serious mental disorder' helped to make that distinction in Hendricks. And a critical distinguishing feature of that `serious . . . disorder' there consisted of a special and serious lack of ability to control behavior. [¶] In recognizing that fact, we did not give to the phrase `lack of control' a particularly narrow or technical meaning. And we recognize that in cases where lack of control is at issue, `inability to control behavior' will not be demonstrable with mathematical precision. It is enough to say that there must be proof of serious difficulty in controlling behavior. And this, when viewed in light of such features of the case as the nature of the psychiatric diagnosis, and the severity of the mental abnormality itself, must be sufficient to distinguish the dangerous sexual offender whose serious mental illness, abnormality, or disorder subjects him to civil commitment from the dangerous but typical recidivist convicted in an ordinary criminal case." (Crane, supra, 534 U.S. at pp. 412-413, 122 S.Ct. at p. 870, 151 L.Ed.2d at p. 862.)
In applying these principles to determine the sufficiency of the evidence, we turn to Williams, supra, 31 Cal.4th 757, 3 Cal.Rptr.3d 684, 74 P.3d 779 and Howard N., supra, 35 Cal.4th 117, 24 Cal.Rptr.3d 866, 106 P.3d 305 for guidance. In Williams, the Supreme Court upheld a civil commitment order under the Sexually Violent Predators Act. The court found there was ample evidence to satisfy the requirement of Crane, supra, 534 U.S. 407, 122 S.Ct. 867, 151 L.Ed.2d 856, that there be proof of serious difficulty in controlling dangerous behavior. The defendant was originally convicted of forcibly raping two women. In the first incident, he dragged the victim to a nearby park. While he was raping her, police officers arrived and had to physically remove him from the victim. (Id. at p. 760, 3 Cal.Rptr.3d 684, 74 P.3d 779.) Two experts testified that he suffered from paraphilia, a serious, incurable mental disorder characterized by intense, obsessive, and repetitive, criminal sexual violence. They further testified that because the defendant continued to act out sexually while confined, he demonstrated a marked lack of control over his sexual behavior. His control was further impaired by another mental disorder that increased his impulsivity. The defendant also admitted he had no control. (Id. at p. 778, 3 Cal.Rptr.3d 684, 74 P.3d 779.)
In Howard N., supra, 35 Cal.4th 117, 24 Cal.Rptr.3d 866, 106 P.3d 305, a proceeding under section 1800, the court concluded the jury was not properly instructed on *377 the requirement of having serious difficulty controlling dangerous behavior and found the evidence insufficient to render the instructional error harmless. The defendant's initial commitment offense was the molestation of a three and one-half-year-old boy. During his confinement, the defendant was seen masturbating in his room, had sexual fantasies about getting aggressive with a female correctional officer, and had outbursts of anger, which the defendant indicated he was unable to control. A clinical psychologist diagnosed him with paraphilia, an abnormal mental condition that does not fit into a specific category. The psychologist was hesitant to diagnose him as a pedophile or a sadist although he exhibited some of the traits and qualities of these illnesses. The psychologist opined that defendant posed a physical danger to the community because he continued to act out in a sexual way on the unit. (Id. at pp. 123-125, 24 Cal. Rptr.3d 866, 106 P.3d 305.)
In finding the instructional error prejudicial, the court found that unlike in Williams, supra, 31 Cal.4th 757, 3 Cal. Rptr.3d 684, 74 P.3d 779, "[t]here was . . . no testimony that [Howard N.'s] mental abnormality caused him serious difficulty controlling his sexually deviant behavior," the defendant's committing offense was one of opportunity (his mother was babysitting the sleeping victim) rather than compulsion, and his incidents of masturbation were not done in a public setting. (Howard N., supra, 35 Cal.4th at p. 138, 24 Cal.Rptr.3d 866, 106 P.3d 305.)
The evidence presented in this case is even weaker than that presented in Howard N. Unlike the underlying offense in Williams and like that in Howard N., the offense leading to Anthony's commitment was not a crime of compulsion but one of opportunity. The commitment offense involved an 8-year-old female and a second offense, which was dismissed, involved her 12-year-old sister.[8] The two offenses occurred in the home of Anthony's best friend "over a period of several months, while the subject was visiting." Indeed, "[h]e practically lived there."
There was clear evidence Anthony suffers from a mental disorder. Dr. Herskovic diagnosed Anthony's mental condition as pedophilia, ADHD, and cannabis abuse. He defined pedophilia as having "intense attraction and urges towards prepubescent children [under 12]" by a person five years or more older. However, he did not testify to the extent or degree of Anthony's disorder, nor did he testify that it was incurable, or that Anthony's disorder was a repetitive compulsive disorder.
Dr. Herskovic never prepared a formal risk assessment evaluation of Anthony. Nevertheless he opined that "without supervision, without further treatment . . . I hesitate to be too specific about the level of risk because that's something I want to evaluate in more detail, but certainly above low risk, at least medium risk or higher. . . ." He testified his opinion was "primarily based on Anthony's history of offending and his current level of functioning. I would take into consideration certainly that it's an unknown how well he could develop peer-level relationships. He's admitted to continued fantasy, like an interest in children during incarceration and during his treatment, which would be a great concern, of course." The doctor also found it very significant that Anthony had committed numerous sexual offenses over a period of years, and had not fully disclosed all of his offenses, but he did not think Anthony's ADHD was a risk factor. *378 However, because Dr. Herskovic was unaware of the details of those offenses, they do not provide a solid basis to conclude those offenses were compulsive crimes driven by his pedophilia.
The task of preparing a formal risk assessment was assigned to Dr. Liederman, who at the last minute advised the prosecutor he was unable to testify as scheduled. Oddly enough, his conclusions were not introduced into evidence, nor did the prosecution proffer the report itself as evidence. Instead, Dr. Herskovic was asked to review the report and take the stand again, this time testifying about Anthony's risk of reoffending. He did so, but was unable to recall many of the relevant risk factors bearing on that question,[9] he did not testify to the factors relied on by Dr. Liederman, and after reviewing Liederman's report, Dr. Herskovic was still "not sure exactly how high a risk" Anthony posed to the community if released. He merely concluded that Anthony posed "some risk, moderate at least" to the community if released.
This testimony does not constitute substantial evidence that Anthony has serious difficulty controlling his behavior. In light of Dr. Herskovic's failure to prepare a formal risk assessment evaluation, his lack of preparation, and his inability to state the risk factors at trial, his reluctance to quantify how high a risk Anthony posed without further study strongly suggests his opinion was based as much on guesswork, surmise or conjecture as on relevant probative facts. (Lockheed Martin Corp. v. Superior Court, supra, 29 Cal.4th at p. 1110, 131 Cal.Rptr.2d 1, 63 P.3d 913.) As such, his testimony is not a basis upon which to establish proof beyond a reasonable doubt.
Moreover, the doctor's opinion fails to satisfy the quantitative requirement that Anthony has "serious difficulty" in controlling his behavior. As stated, he opined that Anthony posed "some risk, moderate at least." The term "moderate" is defined as avoiding extremes of behavior, tending towards the mean or average, or "not seriously or permanently disabling or incapacitating. . . ." (Webster's 3d New Internat. Dict. (1971) p. 1451.) "Serious" is defined as considerable. (Id. at p. 2073.) The conclusion that Anthony poses a moderate risk of reoffense based upon a limited number of risk factors fails to show he has serious difficulty controlling his behavior.
Furthermore, as in Howard N., there was no testimony Anthony's mental abnormality caused him serious difficulty controlling his sexually deviant behavior (Howard N., supra, 35 Cal.4th at p. 138, 24 Cal.Rptr.3d 866, 106 P.3d 305), and unlike in Williams and contrary to respondent's claim, there was no testimony Anthony's other mental disorder (ADHD) exacerbated his pedophilia or compelled him to act it out.[10] Moreover, Dr. Herskovic opined that the impulsivity caused by the ADHD could possibly be controlled with the medication Anthony voluntarily took.
Dr. Herskovic's primary consideration in reaching his opinion was the static factor of Anthony's offense history. As noted, *379 the offenses committed by Anthony were crimes of opportunity rather than of compulsion, and standing alone, do not serve to distinguish Anthony as a dangerous offender subject to civil commitment from dangerous recidivists who are more properly dealt with through the criminal justice system. (Crane, supra, 534 U.S. at pp. 412-413, 122 S.Ct. at p. 870, 151 L.Ed.2d at p. 862.)[11]
Nor did Anthony's confinement behavior support a finding of present lack of control. While the doctor considered Anthony's fantasies, unlike in Williams, there was no evidence he acted out on those fantasies in any inappropriate manner during his confinement. Although Anthony's failure to act out while confined may not be relevant to affirmatively establish he had impulse control, at the very least, it leaves an evidentiary gap whether he lacked control. On the other hand, there was evidence he was not a behavior problem, he understood he had a mental illness, he was participating in the program, and was serious about his treatment.[12] Moreover, Anthony's statement that he felt he needed additional treatment before he could feel comfortable being released without the risk of reoffending does not necessarily support the conclusion he is dangerous. As Dr. Herskovic indicated, admitting one needs treatment shows motivation for treatment and is a "positive factor." Thus, Anthony's statement may just as easily be an indicator he is on the road to rehabilitation.
Nor does Anthony's failure to fully disclose his offense demonstrate that he has serious difficulty controlling his behavior. According to Dr. Herskovic, full disclosure is required to progress in the treatment program and bears on the ward's honesty, a factor in evaluating a person for dangerousness. However, Dr. Herskovic also testified that he had not evaluated Anthony for that purpose and drew no such conclusion.[13]
While Anthony may have a serious difficulty controlling his sexually deviant behavior, the evidence at trial fails to support such a finding in the absence of a good measure of speculation and conjecture. For this reason, we conclude that no rational trier of fact could have found beyond a reasonable doubt that Anthony had serious difficulty controlling his sexually deviant behavior and shall reverse the order of commitment.

III.

Discharge Upon Reversal
Section 1803 provides that "[t]he appellate court may affirm the order of the lower court, or modify it, or reverse it and order the appellant to be discharged." Section 1801.5 mandates that the person being tried for extended commitment "shall be entitled to all rights guaranteed *380 under the federal and state constitutions in criminal proceedings."[14] Reading these two sections together, we hold that, having reversed the commitment order for failure of proof, principles of double jeopardy require that we direct respondent to discharge Anthony from civil confinement.
Double jeopardy, which is proscribed by both the federal and state Constitutions,[15] "forbids a second trial for the purpose of affording the prosecution another opportunity to supply evidence which it failed to muster in the first proceeding." (Burks v. United States (1978) 437 U.S. 1, 11, 98 S.Ct. 2141, 2147, 57 L.Ed.2d 1, 9, fn. omitted; Benton v. Maryland (1969) 395 U.S. 784, 89 S.Ct. 2056, 23 L.Ed.2d 707.) It applies equally to juvenile offender proceedings. (Breed v. Jones (1975) 421 U.S. 519, 95 S.Ct. 1779, 44 L.Ed.2d 346, superseded on other grounds.) While this proscription does not bar retrial upon reversal by an appellate court for trial error (Burks v. United States, supra, 437 U.S. at p. 14, 98 S.Ct. at p. 2148, 57 L.Ed.2d at p. 11; United States v. Tateo (1964) 377 U.S. 463, 465, 84 S.Ct. 1587, 1588, 12 L.Ed.2d 448, 450), it does bar retrial when an appellate court reverses a judgment of conviction for evidentiary insufficiency. (Burks v. United States, supra, 437 U.S. at p. 18, 98 S.Ct. at p. 2150, 57 L.Ed.2d at p. 14; Greene v. Massey (1978) 437 U.S. 19, 24, 98 S.Ct. 2151, 2154, 57 L.Ed.2d 15, 21 (applying Burks rule to reversal of state court convictions).)
Double jeopardy does not apply to civil actions. (Hudson v. United States (1997) 522 U.S. 93, 99, 118 S.Ct. 488, 493, 139 L.Ed.2d 450, 459; Hendricks, supra, 521 U.S. at p. 369, 117 S.Ct. at p. 2086, 138 L.Ed.2d at p. 520.) Because extended commitment proceedings under section 1800 et seq. are civil in nature (Howard N., supra, 35 Cal.4th at p. 122, 24 Cal. Rptr.3d 866, 106 P.3d 305; In re Gary W. (1971) 5 Cal.3d 296, 301-302, 96 Cal.Rptr. 1, 486 P.2d 1201, superseded by statute on other grounds), the double jeopardy provisions of the state and federal Constitution do not bar such proceedings. (Hendricks, supra, 521 U.S. at p. 369, 117 S.Ct. at p. 2086, 138 L.Ed.2d at p. 520; In re Steven S. (1999) 76 Cal.App.4th 349, 353, 90 Cal. Rptr.2d 290 [double jeopardy does not apply to EDA proceeding]; People v. Francis (2002) 98 Cal.App.4th 873, 877, 120 Cal.Rptr.2d 90 [double jeopardy does not apply to civil commitment proceeding of mentally disordered offender]; People v. Superior Court (Williams) (1991) 233 Cal. *381 App.3d 477, 484, 284 Cal.Rptr. 601 [double jeopardy does not apply to proceeding to extend civil commitment of defendant previously found not guilty by reason of insanity].)
However, section 1801.5 makes "all rights guaranteed under the federal and state constitutions in criminal proceedings" applicable in a trial for extended commitment held pursuant to section 1800. We find this "all rights" language includes the prohibition against double jeopardy.
In construing statutory language, our task "is to ascertain and effectuate legislative intent. [Citations.] We turn first to the words of the statute themselves, recognizing that `they generally provide the most reliable indicator of legislative intent.' [Citations.] When the language of a statute is `clear and unambiguous' and thus not reasonably susceptible of more than one meaning, `"`"there is no need for construction, and courts should not indulge in it."'"' [Citations.]" (People v. Gardeley (1996) 14 Cal.4th 605, 621, 59 Cal.Rptr.2d 356, 927 P.2d 713.) When considering the statutory language, we adhere to the maxim that "`[c]ourts should give meaning to every word of a statute if possible, and should avoid a construction making any word surplusage.' [Citation.]" (Reno v. Baird (1998) 18 Cal.4th 640, 658, 76 Cal.Rptr.2d 499, 957 P.2d 1333.)
The language of section 1801.5 is clear and unambiguous. The defendant at an EDA trial "shall be entitled to all rights guaranteed under the federal and state constitutions in criminal proceedings." Those rights attach once "a trial is ordered pursuant to Section 1801. . . ." The statute does not limit or qualify this guarantee in any way. A holding that those rights do not include double jeopardy (Burks v. United States, supra, 437 U.S. at p. 11, 98 S.Ct. at p. 2147, 57 L.Ed.2d at p. 9), would render the word "all" meaningless.
It is true that double jeopardy does not apply to bar an EDA trial in the first instance. (In re Steven S., supra, 76 Cal. App.4th at p. 353, 90 Cal.Rptr.2d 290.) Were it otherwise, the EDA itself would be rendered meaningless because it only operates upon a person who has been committed as a juvenile offender and is presently in the custody of the CYA. (§ 1800.) However, under the terms of the statute, once the trial is ordered under section 1801.5 all constitutional rights guaranteed by the state and federal Constitutions come into play.
Any doubt as to this construction is dispelled by looking to section 1803, which grants the appellate court discretion to order the appellant discharged if it reverses the lower court's order of commitment.[16] This discretion is consistent with *382 double jeopardy, which does not bar retrial upon reversal of a conviction for trial error (Burks v. United States, supra, 437 U.S. at p. 14, 98 S.Ct. at p. 2148, 57 L.Ed.2d at p. 11; Howard N., supra, 35 Cal.4th at p. 138, 24 Cal.Rptr.3d 866, 106 P.3d 305).[17] but does bar retrial when a conviction is reversed for evidentiary insufficiency. (Burks v. United States, supra, 437 U.S. at p. 18, 98 S.Ct. at p. 2148, 57 L.Ed.2d at p. 14.) Applying the cardinal rule of statutory construction that "`every statute should be construed with reference to the whole system of law of which it is a part so that all may be harmonized and have effect'" (Landrum v. Superior Court (1981) 30 Cal.3d 1, 14, 177 Cal.Rptr. 325, 634 P.2d 352), we hold that principles of double jeopardy require an appellate court to order the discharge of an appellant from custody pursuant to section 1803 upon the reversal of an order of extended commitment for insufficiency of the evidence.
This conclusion is also in accordance with the decision in In re Luis C. (2004) 116 Cal.App.4th 1397, 11 Cal.Rptr.3d 429 (Luis C.), where the Fifth District Court of Appeal also considered the meaning of the "all rights" provision in section 1801.5. Also finding those words "clear and unambiguous," the Fifth District held that the defendant in an EDA trial had the right not to testify against himself.
Nevertheless, relying on People v. Henderson (1981) 117 Cal.App.3d 740, 172 Cal.Rptr. 858 (Henderson) and People v. Superior Court (Williams), supra, 233 Cal.App.3d 477, 284 Cal.Rptr. 601, respondent and the dissent take the position that double jeopardy remains inapplicable to section 1801.5 proceedings because that section merely requires application of constitutional protections mandated by judicial decisions. We find these cases inapposite because the statutory language construed in them, while similar, is not identical to that used in section 1801.5. Nor do the statutory schemes at issue in Henderson and People v. Superior Court (Williams) contain a provision similar to section 1803.
In Henderson, supra, 117 Cal.App.3d 740, 172 Cal.Rptr. 858, the court considered whether the privilege against self-incrimination was mandated under the terms of former section 6316.2, subdivision (e) (repealed by Stats. 1981, ch. 928, § 2, p. 3485).[18] That provision provides for an extension hearing for mentally disordered sex offenders (MDSO). The pertinent statutory language stated that a defendant in an MDSO hearing "shall be entitled to *383 the rights guaranteed under the Federal and State Constitutions for criminal proceedings." (former § 6316.2, subd. (e), italics added.) The court concluded that this language only "codifies the application of constitutional protections to MDSO proceedings mandated by judicial decision [Citations]. It does not extend the protection of the constitutional privileges against self-incrimination to testimonial communications which are not incriminatory." (117 Cal.App.3d at p. 748, 172 Cal.Rptr. 858.)
In People v. Superior Court (Williams), supra, 233 Cal.App.3d 477, 284 Cal.Rptr. 601, the court construed Penal Code section 1026.5. That provision governs civil extension hearings of persons found not guilty by reason of insanity. Using the same language used in former section 6316.2, subdivision (e), section 1026.5, subdivision (b)(7) provides that a person facing extension of an insanity commitment "shall be entitled to the rights guaranteed under the federal and State Constitutions for criminal proceedings. All proceedings shall be in accordance with applicable constitutional guarantees." (Italics added.) Relying on Henderson, the court concluded that the constitutional rights guaranteed by Penal Code section 1026.5 do not include double jeopardy and therefore the appellate court was not barred from reviewing the trial court's decision granting nonsuit. The appellate court reasoned that "although many constitutional protections relating to criminal proceedings are available in extension proceedings, the application of all such protections is not mandated by section 1026.5. The statutory language merely codifies the application of constitutional protections to extension hearings mandated by judicial decision." (233 Cal.App.3d at p. 488, 284 Cal.Rptr. 601; see also People v. Powell (2004) 114 Cal.App.4th 1153, 8 Cal.Rptr.3d 441 [relying on People v. Superior Court (Williams), the court held that Penal Code section 1026.5 does not mandate the right to personally waive jury trial].)
Unlike the statutory language construed by the courts in Henderson and People v. Superior Court (Williams), the statutory language in section 1801.5 guarantees "all" constitutional rights guaranteed in criminal proceedings. Moreover, when section 1801.5 was amended in 1984 to include the constitutional rights guarantee, the Legislature was not writing on a blank slate. The language in former section 6316.2, subdivision (e) had been in effect for over five years and had been construed by Henderson three years earlier.
The constitutional rights guarantee was included in former section 6316.2, subdivision (e) in 1977 when that section was added to the Welfare and Institutions Code. (Stats.1977, ch. 164, § 3, p. 634.) The same language was used in section 1026.5 when it was added to the Penal Code in 1979. (Stats.1979, ch. 1114, § 3, p. 4051.) Against this statutory background, the Legislature amended section 1801.5 by adding the "all [constitutional] rights" language. (Stats.1984, ch. 546, § 3, p. 2176.)
Had the Legislature intended to grant the same constitutional rights in section 1801.5 as it granted in former section 6316.2 and Penal Code section 1026.5, it would have used the same language. Since it did not, instead specifying that the defendant is entitled to "all" constitutional rights in criminal proceedings, we must give the word "all" its inclusive commonsense meaning.
As the Fifth District in Luis C., supra, 116 Cal.App.4th 1397, 11 Cal.Rptr.3d 429 stated, the construction in People v. Superior Court (Williams) "rendered the statutory declaration of rights surplusage and supplanted the legislative rights-inclusive language with a process whereby judges selected which rights would apply. If the *384 Legislature did not intend that `all rights' apply, it  rather than the court  should specify which rights applied. Finally, that the courts had extended certain rights to commitment proceedings under constitutional principles did not prevent the Legislature from providing additional rights to those subjected to the proceedings." (Luis C., supra, 116 Cal.App.4th at p. 1403, 11 Cal.Rptr.3d 429.)
In the dissent's view, the Legislature specified the right to a unanimous jury verdict and proof beyond a reasonable doubt in the last sentence of section 1801.5, intending to codify People v. Superior Court (Vernal D.) (1983) 142 Cal. App.3d 29, 36, 190 Cal.Rptr. 721 (Vernal D.), and our construction renders that sentence superfluous. We disagree.
There is nothing in the language of section 1801.5 to suggest the Legislature intended those two rights to be the only constitutional rights applicable in a trial under section 1801.5. Indeed, such a construction would render the statute unconstitutional because a defendant in a civil commitment hearing has other constitutional rights, including the right to have the state bear the burden of proof (People v. Superior Court (Williams), supra, 233 Cal.App.3d at p. 488, 284 Cal.Rptr. 601), to be represented by counsel (see People v. Tilbury (1991) 54 Cal.3d 56, 69, 284 Cal. Rptr. 288, 813 P.2d 1318), and to confront and cross-examine witnesses. (People v. Wolozon (1982) 138 Cal.App.3d 456, 462, 188 Cal.Rptr. 35.) Needless to say, none of these rights are specified in section 1801.5.
Nor does Vernal D., supra, 142 Cal.App.3d 29, 190 Cal.Rptr. 721, stand for the narrow proposition asserted by the dissent. In Vernal D., the court held that section 1800 et seq. was unconstitutional because it authorized extended commitment of a juvenile detainee based on a less than unanimous jury verdict. In so holding, the court stated, "[t]he consequence of the proceeding, involuntary incarceration, triggers the full panoply of due process protections." (Id. at p. 36, 190 Cal.Rptr. 721, fn. omitted, italics added.) The court did not list what those protections are. However, in the footnote that follows, the court addressed the standard of proof applicable in such proceedings although the defendant had not raised the issue. Because the matter was to be remanded for retrial, the court explained for the guidance of the trial court, that to comply with the due process clauses of the state and federal Constitutions, an extended detention under section 1800 must be justified by proof beyond a reasonable doubt. (Id. at p. 36, fn. 3, 190 Cal.Rptr. 721.)
Thus, while Vernal D. held that due process requires a unanimous jury and proof beyond a reasonable doubt in an extended commitment hearing under section 1800 et seq., it did not hold that those two rights are the only ones required. To the contrary, it held that such hearings require "the full panoply of due process protections" (142 Cal.App.3d at p. 36, 190 Cal.Rptr. 721), and as we have shown above, those protections include more than the two rights specified in section 1801.5.
Nor does the "all" constitutional rights requirement in section 1801.5 express an intent to merely codify Vernal D. It is clearly broader than the "full panoply" requirement because the former applies in "criminal proceedings" while the latter is limited to "due process protections." Thus, the dissent's construction would render the words "in criminal proceedings" meaningless. If the Legislature had intended section 1801.5 to apply only to those constitutional rights required by judicial decision, i.e. "the full panoply of due process protections," it would have omitted the words "in criminal proceedings" and *385 would have stated instead "[t]he person shall be entitled to all rights guaranteed under the federal and state constitutions."
The dissent declines to order Anthony discharged pursuant to section 1803, reasoning it would be unfair to fault the People for failing to prove an element required for commitment that was not in the statute at the time of trial. This assumes the jury was incorrectly instructed. That is not the case.
To preserve the constitutionality of the statute, the court in Howard N. interpreted the statutory scheme to require proof that the person has serious difficulty controlling his dangerous behavior. (Howard N., supra, 35 Cal.4th at pp. 132, 135, 24 Cal.Rptr.3d 866, 106 P.3d 305.) This holding was compelled by Hendricks, supra, 521 U.S. 346, 117 S.Ct. 2072, 138 L.Ed.2d 501 and Crane, supra, 534 U.S. 407, 122 S.Ct. 867, 151 L.Ed.2d 856, because, as the court in Howard N. found, those cases, "embody[] general due process principles regarding civil commitment." (35 Cal.4th at p. 131, 24 Cal.Rptr.3d 866, 106 P.3d 305.) The California Supreme Court therefore relied on those two cases when it addressed constitutional challenges to other civil commitment schemes. (Id. at pp. 130-133, 24 Cal.Rptr.3d 866, 106 P.3d 305; see Hubbart v. Superior Court (1999) 19 Cal.4th 1138, 1158, 81 Cal.Rptr.2d 492, 969 P.2d 584; Williams, supra, 31 Cal.4th at pp. 759, 774, 776, 3 Cal.Rptr.3d 684, 74 P.3d 779.)
Thus, the People were in no way disadvantaged during the first trial. There was no instructional error and none is asserted. The instruction that was given is a modified version of CALJIC No. 4.19, which instructs in the language of the statute for committing a sexually violent predator and has been held to satisfy substantive due process under Hendricks and Crane. (Hubbart v. Superior Court, supra, 19 Cal.4th at pp. 1157-1158, 81 Cal.Rptr.2d 492, 969 P.2d 584; Williams, supra, 31 Cal.4th at pp. 759-760, 3 Cal.Rptr.3d 684, 74 P.3d 779.) The court in Williams found that statutory language "inherently embraces and conveys the need for a dangerous mental condition characterized by impairment of behavioral control." (Williams, supra, at p. 774, 3 Cal.Rptr.3d 684, 74 P.3d 779.) This is accomplished by including the requirements of "a diagnosed mental disorder [citation] affecting the emotional or volitional capacity [citation], which predisposes one to commit criminal sexual acts so as to render the person a menace to the health and safety of others [citation], such that the person is `likely [to] engage in sexually violent criminal behavior' [citations]." (Ibid.) By defining the "`likely to reoffend'" element as "an actual risk of violent reoffense which . . . is `substantial,' `serious,' and `well-founded[,]'" the jury necessarily understands that the persons' ability to control his behavior "is seriously and dangerously impaired. No additional instructions or findings are necessary." (Id. at pp. 776-777, 3 Cal.Rptr.3d 684, 74 P.3d 779, fn. omitted.) The modified version given to the jury in the present case included these elements.[19]
*386 The People were clearly aware of the above mentioned authorities and made every effort to prove Anthony's dangerousness as required by Howard N., actually spoon-feeding their expert in an effort to elicit testimony to satisfy Howard N. However, for reasons set forth, the evidence failed to support the instruction.
If principles of double jeopardy are not applied when the commitment order is reversed for evidentiary insufficiency, the state could theoretically keep the person confined without ever proving the defendant is unable to control his dangerousness. This possibility raises at least two questions, how many opportunities should the state be given to present evidence it failed to muster in the first proceeding and what evidence would be produced.
Due process requires that involuntary civil commitment be based upon proof the defendant is presently dangerous beyond his or her control. (Howard N., supra, 35 Cal.4th at p. 128, 24 Cal.Rptr.3d 866, 106 P.3d 305; Crane, supra, 534 U.S. at pp. 412-413, 122 S.Ct. at p. 870, 151 L.Ed.2d at pp. 862-863.) In the absence of such proof, confinement is nothing more than punishment. (Crane, supra, 534 U.S. at pp. 412-413, 122 S.Ct. at p. 870, 151 L.Ed.2d at p. 862.) The issue of dangerousness is therefore a question that must be answered with respect to a specific period of time, namely upon discharge of the individual. (§ 1800.)[20] The question on retrial then is not whether the person was dangerous (as the state failed to prove at the first trial) but whether he is presently dangerous. Assuming the person has received treatment during confinement as required by law (People v. Feagley (1975) 14 Cal.3d 338, 359, 121 Cal.Rptr. 509, 535 P.2d 373), his ability to control his dangerousness may have improved since the first trial. However, if the person's confinement is continued and the state is allowed to retry him for his current dangerousness, he will have been held in continued confinement without the state ever having to prove he was dangerous at the time his commitment was set to expire. The state could therefore keep the person confined in an endless cycle of retrial without ever proving dangerousness.
For these reasons, we conclude double jeopardy applies to a trial held pursuant to section 1801.5 and that retrial is barred by section 1803 upon reversal of a commitment order for failure of proof.
In the absence of a valid order of further detention made pursuant to the EDA, the CYA's jurisdiction over Anthony expired on November 2, 2004. (§ 1769, subd. (a).) We shall therefore order his immediate discharge from confinement.


*387 DISPOSITION
The judgment is reversed. Respondents are directed to discharge Anthony C. from confinement.
I concur: ROBIE, J.
Concurring and Dissenting Opinion of SIMS, J.
I concur in parts I and II of the majority opinion, where the majority concludes Anthony's commitment was not supported by substantial evidence. I respectfully dissent from part III of the majority opinion, which concludes that a retrial in this case is barred.
I agree with the majority's analysis and conclusion that, ordinarily, double jeopardy would not bar a retrial because this proceeding is a civil proceeding and double jeopardy does not bar a retrial in a civil proceeding.
I respectfully dissent from the majority's conclusion that retrial is barred by Welfare and Institutions Code section 1801.5.[1] The majority concludes, "The language of section 1801.5 is clear and unambiguous." I respectfully disagree. Construed as a whole, I think section 1801.5 is ambiguous and the legislative history indicates the Legislature did not intend to impose double jeopardy principles on these civil proceedings.
Section 1801.5 states in pertinent part, "The person shall be entitled to all rights guaranteed under the federal and state constitutions in criminal proceedings. A unanimous jury verdict shall be required in any jury trial. As to either a court or a jury trial, the standard of the proof shall be that of proof beyond a reasonable doubt." "We must read a statute as a whole and attempt to harmonize its elements by considering each clause or section in the context of the overall statutory framework. [Citation.]" (Khajavi v. Feather River Anesthesia Medical Group (2000) 84 Cal.App.4th 32, 46, 100 Cal. Rptr.2d 627.) "`[T]he "plain meaning" rule does not prohibit a court from determining whether the literal meaning of a statute comports with its purpose or whether such a construction of one provision is consistent with other provisions of the statute. The meaning of a statute may not be determined from a single word or sentence; the words must be construed in context, and provisions relating to the same subject matter must be harmonized to the extent possible. [Citation.] Literal construction should not prevail if it is contrary to the legislative intent apparent in the statute. The intent prevails over the letter, and the letter will, if possible, be so read as to conform to the spirit of the act.' (Lungren v. Deukmejian (1988) 45 Cal.3d 727, 735 [248 Cal.Rptr. 115, 755 P.2d 299].)" (People v. King (1993) 5 Cal.4th 59, 69, 19 Cal.Rptr.2d 233, 851 P.2d 27.)
When I read the statutory language as a whole, I conclude the foregoing statutory language is internally confusing. On the one hand, while the statute says a person shall be entitled to "all" federal and state constitutional rights guaranteed in criminal proceedings, the statute then immediately identifies a right  the unanimous jury verdict  which has long been required by our state Constitution in criminal cases. (People v. Superior Court (Thomas) (1967) 67 Cal.2d 929, 932, 64 Cal.Rptr. 327, 434 P.2d 623.) The next sentence identifies another right  proof beyond a reasonable doubt  that has long been guaranteed by the federal Constitution in criminal cases. (In re Winship (1970) 397 U.S. 358, 361-365, 90 S.Ct. 1068, 1071-1073, 25 L.Ed.2d 368, 369.) Thus, if the Legislature had really intended to confer *388 "all" constitutional rights available in criminal proceedings, the last two quoted sentences would be surplusage.[2] However, it is a venerable maxim of statutory construction that courts should give meaning to every word in a statute and should avoid a construction making any word surplusage. (Cooley v. Superior Court (2002) 29 Cal.4th 228, 249, 127 Cal.Rptr.2d 177, 57 P.3d 654 [construing Sexually Violent Predators Act.])
In light of the internal confusion of the three statutory sentences quoted above, I do not find section 1801.5 unambiguous, as does the majority. Rather, I think that the statute is sufficiently ambiguous to justify resort to legislative history to try to figure out what the Legislature had in mind. (See Kaufman & Broad Communities, Inc. v. Performance Plastering, Inc. (2005) 133 Cal.App.4th 26, 29, 34 Cal. Rptr.3d 520.)
The statutory language of section 1801.5 was enacted by Assembly Bill 2760 (AB 2760), introduced during the 1983-1984 session of the Legislature. (See Stats. 1984, ch. 546, § 3, p. 2176.)
The Digest of AB 2760 before the Assembly Criminal Law and Public Safety Committee stated in part:
"The statute now requires only that three-fourths of the members of the jury agree by a preponderance of the evidence that the ward is dangerous. Court decisions have held that due process requires a unanimous jury verdict beyond a reasonable doubt. This bill codifies these procedural requirements." (Assem. Com. on Criminal Law and Public Safety, Analysis of Assem. Bill No. 2760 (1983-1984 Reg. Sess.) Apr. 4, 1984, p. 1.)
Similarly, the analysis of AB 2760 that was prepared by the Senate staff recited as follows:
"PURPOSE
"Existing law provides for two-year extensions of Youth Authority jurisdiction over a ward if, by reason of mental or physical abnormality, [he] would be dangerous to the public if released. The statute now requires that three-fourths of the members of the jury agree by a preponderance of the evidence that the ward is dangerous. An appellate court decision, however, has held that due process and equal protection require a unanimous jury verdict beyond a reasonable doubt.
"This bill would codify those procedural requirements and make other technical changes in existing law.
"The purpose of this bill is to conform statutory and case law." (Sen. Com. on Judiciary, Analysis of Assem. Bill No. 2760 (1983-1984 Reg. Sess.) as introduced, pp. 1-2.)
The report of the Assembly Committee on Criminal Law and Public Safety is to the same effect: "Purpose. The purpose of the bill is to codify judicially mandated due process safeguards in the statute to insure that extension proceedings are conducted properly. (See People v. Superior Court (Vernal D.) [(1983)] 142 Cal.App.3d 29 [190 Cal.Rptr. 721].) CYA reports that there are about 12 such cases each year. This is a rather rare proceeding and it *389 can[not] be assumed most prosecutors are familiar with it. Therefore, it is important to correct the statutes which currently inaccurately reflect what procedural safeguards are necessary." (Assem. Com. on Criminal Law and Public Safety, Analysis of Assem. Bill No. 2760 (1983-1984 Reg. Sess.) Apr. 4, 1984, p. 1.)
It therefore appears that the purpose of the 1984 amendment to section 1801.5 was to require, by statute, those constitutional rights that had been mandated by the then-recent 1983 decision in People v. Superior Court (Vernal D.), supra, 142 Cal. App.3d 29, 190 Cal.Rptr. 721. This conclusion is entirely consistent with the holding of this court in People v. Henderson (1981) 117 Cal.App.3d 740, 172 Cal.Rptr. 858, which interpreted the meaning of statutory language mandating, "the rights guaranteed under the federal and state Constitutions for criminal proceedings" in proceedings to extend the commitment of mentally disordered sex offenders. (Henderson, supra, 117 Cal.App.3d at p. 747, 172 Cal. Rptr. 858.) In Henderson, we rejected the argument that the foregoing statutory language mandated application of the constitutional privilege against self-incrimination. We said, "We do not so read the command of the statute. Subdivision (e) of section 6316.2 codifies the application of constitutional protections to MDSO proceedings mandated by judicial decision [citation]. It does not extend the protection of the constitutional privileges against self-incrimination to testimonial communications which are not incriminatory." (Henderson, supra, 117 Cal.App.3d at pp. 747-748, 172 Cal.Rptr. 858.)
"We generally presume the Legislature is aware of appellate court decisions. [Citations.]" (Harris v. Capital Growth Investors XIV (1991) 52 Cal.3d 1142, 1155, 278 Cal.Rptr. 614, 805 P.2d 873.) In this case, the Legislature was doubtless aware of our opinion in Henderson, supra, 117 Cal.App.3d 740, 172 Cal.Rptr. 858, and the legislative history of the 1984 amendment of section 1801.5 demonstrates convincingly that the Legislature intended the amended statute to perform a similar task as that performed by the statute at issue in Henderson. Or, in the words of senate staff, quoted above, "The purpose of this bill is to conform statutory and case law."
In sum, I read the disputed statutory language as follows:
"The person shall be entitled to all rights guaranteed under the federal and state constitutions in criminal proceedings that have been mandated by People v. Superior Court (Vernal D.) (1983) 142 Cal. App.3d 29, 190 Cal.Rptr. 721. One such right is that a unanimous jury verdict shall be required in any jury trial. The other such right is that in either a court or a jury trial, the standard of proof shall be that of proof beyond a reasonable doubt."
Because no judicial decision has ever mandated that double jeopardy principles apply to this extended detention proceeding, double jeopardy is not required by section 1801.5, nor by any other law.
In support of its statutory interpretation the majority relies on In re Luis C. (2004) 116 Cal.App.4th 1397, 11 Cal.Rptr.3d 429. In that case, the Court of Appeal for the Fifth Appellate District concluded the words of section 1801.5 "are clear and unambiguous." (Id. at p. 1402, 11 Cal. Rptr.3d 429.) Apparently for this reason, the Luis C. court did not consider the legislative history of the 1984 amendment of the statute. As I said, I do not find the language of section 1801.5 unambiguous, and I find the legislative history enlightening in the extreme. For that reason, I respectfully disagree with the analysis of In re Luis C.
*390 The majority also relies upon section 1803, which, according to the majority, confers "discretion" on the court to discharge the appellant from CYA control upon reversal of the judgment. Assuming this court has such discretion, I would not exercise it here.
The record shows a lack of substantial evidence that Anthony has serious difficulty controlling his behavior. Yet that requirement for commitment was not in the statute when Anthony was tried. Rather, it was later read into the statute by our Supreme Court in In re Howard N. (2005) 35 Cal.4th 117 at page 135, 24 Cal.Rptr.3d 866, 106 P.3d 305. I am not confident the People adduced all available evidence on the issue. In my view, fairness compels a retrial.
Anthony also contends retrial is barred by principles of res judicata and collateral estoppel. Not so. Principles of res judicata and collateral estoppel apply only where there has been a final judgment. (People v. Barragan (2004) 32 Cal.4th 236, 252-255, 9 Cal.Rptr.3d 76, 83 P.3d 480.) There is no final judgment in this case because it has been reversed. (Ibid.) Neither res judicata nor collateral estoppel bars a retrial here.
I would remand to allow the People to retry the extended commitment of Anthony C. (See In re Michael H. (2005) 128 Cal.App.4th 1074, 1091, 27 Cal.Rptr.3d 627.)
NOTES
[1]  The California Youth Authority was renamed, effective July 1, 2005, the division of Juvenile Justice of the Department of Corrections and Rehabilitation. (Gov.Code, §§ 12838, subd. (a), 12838.3.) However, we will retain the designation CYA for simplicity.
[2]  A reference to a section is to the Welfare and Institutions Code unless otherwise specified or implied. All references to sections 1800-1801.5 are to the version in effect in 2004.
[3]  According to the probation report from that proceeding, the victim was the sister of Anthony's best friend. She told sheriff's deputies that between May and August of 2001. Anthony orally copulated her on multiple occasions and inserted Q-tips in her vagina twice. He obtained her cooperation by bribing her with Pokemon video games, cards, and gum and made her promise not to tell anyone. Anthony also molested the victim's 12-year-old sister on 10 to 12 occasions, at which time he kissed her and rubbed her breasts.
[4]  People v. Harvey (1979) 25 Cal.3d 754, 159 Cal.Rptr. 696, 602 P.2d 396.
[5]  Writing victim letters is an exercise that provides staff with information about how the ward thinks and processes his crime.
[6]  There are four parts to the assault cycle, the buildup, the planning, the release, and the cover-up.
[7]  Anthony's behavior was good most of the time. He did not act out, and while initially his progress in the program was slow, after the first six months he had a fairly serious attitude towards his treatment, and he spoke and participated in his group therapy sessions.
[8]  Herskovic testified that while Anthony disclosed three additional victims, "we didn't have a chance to really get into any details so I can't say anything about them."
[9]  When asked to list other risk factors, Herskovic was unable to do so, indicating he needed to look at a list of risk factors.
[10]  To the contrary, Dr. Herskovic testified that while ADHD has to do with impulsivity, "it has nothing specifically to do with pedophilia." When asked whether pedophilia coupled with ADHD increases the risk of acting out the pedophilia, he responded, "I would think so. But, you know, it may not have anything to do with it." When asked whether there was any correlation between a lack of impulse control and the risk of reoffending as a result of pedophilia, he testified, "I don't know."
[11]  The record does not illuminate the exact nature of the offenses disclosed by Anthony other than the ones described in the probation report in the juvenile proceedings. It appears that Anthony did not discuss the details of those crimes during treatment. Thus, neither Dr. Herskovic nor the jury was informed of the age of those other victims nor the nature of the offenses against them. If the other victims were closer in age to Anthony, the offenses may not have been a result of pedophilia.
[12]  As stated, Dr. Herskovic testified that wards who completed the formal treatment program had a reduced risk of recidivism when compared to wards who do not complete the program. He did not quantify the difference in risk.
[13]  Dr. Herskovic testified that he was "not bringing that up in relation to Anthony in particular at this point. I have not evaluated him for psychopathy, but certainly being untruthful would be a factor if I were doing that evaluation."
[14]  Section 1801.5 states in full: "If a trial is ordered pursuant to Section 1801, the trial shall be by jury unless the right to a jury trial is personally waived by the person, after he or she has been fully advised of the constitutional rights being waived, and by the prosecuting attorney, in which case trial shall be by the court. If the jury is not waived, the court shall cause a jury to be summoned and to be in attendance at a date stated, not less than four days nor more than 30 days from the date of the order for trial, unless the person named in the petition waives time. The court shall submit to the jury, or, at a court trial, the court shall answer, the question: Is the person physically dangerous to the public because of his or her mental or physical deficiency, disorder, or abnormality? The court's previous order entered pursuant to Section 1801 shall not be read to the jury, nor alluded to in the trial. The person shall be entitled to all rights guaranteed under the federal and state constitutions in criminal proceedings. A unanimous jury verdict shall be required in any jury trial. As to either a court or a jury trial, the standard of proof shall be that of proof beyond a reasonable doubt."
[15]  The Fifth Amendment of the federal Constitution provides in pertinent part: "nor shall any person be subject for the same offense to be twice put in jeopardy of life or limb. . . ." Article 1, section 15 of the California Constitution provides in pertinent part: "Persons may not twice be put in jeopardy for the same offense. . . ."
[16]  Section 1803 provides in pertinent part that "[t]he appellate court may affirm the order of the lower court, or modify it, or reverse it and order the appellant to be discharged."

Section 1803 remains unchanged since its adoption in 1963. (Stats. 1963, ch. 1693, Sec. 4, § 1803, p. 3324.) In 1963, there was no provision for a jury trial and the trial court was directed to discharge the person "[i]f the court is of the opinion that discharge of the person from continued control of the authority would not be physically dangerous to the public. . . ." (Id. Sec. 4, § 1801, p. 3323.) Since there was no jury trial, a reversal would occur only for lack of substantial evidence, consistent with the power invested in the trial court. When section 1801.5 was added to the code in 1971 to provide for a jury trial (Stats. 1971, ch. 1337, § 1, p. 2641; Stats. 1971, ch. 1389, § 5, p. 2744; Stats. 1971, ch. 1680, § 1, p. 3606), section 1803 was not amended to reflect the fact that reversal could occur for legal error. Accordingly the terms "may" and "lower court" should be interpreted to provide for reversal both for legal error in the instruction of the jury and for failure of substantial evidence. It is only in the latter case that discharge is required.
[17]  The California Supreme Court in Howard N., supra, 35 Cal.4th at page 138, 24 Cal. Rptr.3d 866, 106 P.3d 305, concluded there was prejudicial instructional error and remanded the cause to the Court of Appeal, with directions that to the extent Howard N. does not prevail on any remaining claims in that court, he is "entitled to a new petition, probable cause hearing, and if necessary, trial, under the correct due process standard." (Fn. omitted.)
[18]  Although the law governing mentally disordered sex offenders was repealed in 1981 (Stats.1981, ch. 928, § 2, p. 3485), it has continuing effect on mentally disordered sex offenders who were committed under that law prior to the effective date of the repealing statute and whose commitment have not yet been terminated. (Id., § 3.) Section 3 of the statute, which is uncodified, states that "[n]othing in this act shall be construed to affect any person under commitment under Article 1 . . . prior to the effective date of this act. It is the Legislature's intent that persons committed as mentally disordered sex offenders and persons whose terms of commitment are extended under the provisions of Section 6316 of the Welfare and Institutions Code shall remain under these provisions until the commitments are terminated and the persons are returned to the court for resumption of the criminal proceedings." (See Historical and Statutory Notes, 73D West's Ann. Welf. & Inst.Code (1998 ed.) foll. § 6300, p. 143.)
[19]  The jury was instructed in pertinent part as follows: "a petition for commitment, or extension, has been filed with the court alleging that Anthony . . . is a dangerous person as that term is defined in this code section, section 1800. . . . [¶] The term dangerous person under this code section means a person who first has been committed to the California Youth Authority for the commission of a crime; and, second, has a diagnosed mental disorder, deficiency, or abnormality; and third, this disorder, deficiency, or abnormality makes him a danger to the health and safety of others in that it is likely that he will engage in sexual criminal behavior unless confined within a secure facility. [¶] The word likely, as used in this definition, means the person presents a substantial danger that is a serious and well founded risk that he will commit sexual crimes if free in the community. However, it does not mean that it must be more probable than not that there will be an instance of reoffending." (Italics added.)

This language tells the jury that the mental disorder must be of such gravity it "makes him" likely to engage in sexual criminal behavior, to wit, presents "a substantial danger that is a serious and well founded risk that he will commit sexual crimes if free in the community." This is tantamount to saying the mental disorder is of such gravity it "causes [the person] to have serious difficulty controlling his or her dangerous behavior." (Howard N., supra, 35 Cal.4th at p. 135, 24 Cal. Rptr.3d 866, 106 P.3d 305.)
[20]  Section 1769, subdivision (a) states as follows: "Every person committed to the Department of the Youth Authority by a juvenile court shall, except as provided in subdivision (b), be discharged upon the expiration of a two-year period of control or when the person reaches his or her 21st birthday, whichever occurs later, unless an order for further detention has been made by the committing court pursuant to Article 6 (commencing with Section 1800)."
[1]  Undesignated statutory references are to the Welfare and Institutions Code.
[2]  The majority argues, "There is nothing to suggest the Legislature intended those two rights [unanimous jury verdict and proof beyond a reasonable doubt] to be an exhaustive list of the constitutional rights applicable in a trial under section 1801.5." I disagree. As I shall explain, the legislative history of section 1801.5 demonstrates the Legislature intended to codify the constitutional rights mandated in CYA extended commitment proceedings by People v. Superior Court (Vernal D.) (1983) 142 Cal.App.3d 29, 190 Cal.Rptr. 721. Those rights were the right to a unanimous jury verdict and proof beyond a reasonable doubt. (Id. at pp. 35-36 & fn. 3, 190 Cal.Rptr. 721.)
