
160 Cal.App.3d 1087 (1984)
207 Cal. Rptr. 199
THE PEOPLE, Plaintiff and Respondent,
v.
JAMES MICHAEL JEROME, Defendant and Appellant.
Docket No. 13081.
Court of Appeals of California, Third District.
October 16, 1984.
*1092 COUNSEL
John R. Olson, under appointment by the Court of Appeal, and Susan Sutherland for Defendant and Appellant.
John K. Van de Kamp, Attorney General, Roger E. Venturi and Anthony L. Dicce, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
SPARKS, J.
In this appeal we consider the doctrine of legal impossibility in a case where the defendant was convicted of the crime of "oral copulation with another person who is under 14 years of age" but the victim was 15 years old. (Pen. Code, § 288a, subd. (c).)[1]
*1093 Defendant entered a negotiated plea of guilty before the magistrate to charges of forcible rape (§ 261, subd. (2)), and oral copulation of a minor under 14 (§ 288a, subd. (c)). He also admitted the allegation that he previously had been convicted of forcible rape (§ 667.6, subd. (a)). He was certified to the superior court for sentencing and that court imposed a term of 21 years in state prison. Defendant appeals, contending that the court erroneously imposed judgment on his plea of guilty to the oral copulation count because the victim was 15 years old. He also contends that there were several sentencing errors. We affirm the enhanced rape conviction but agree with defendant's claim that the conviction on the oral copulation count cannot stand; accordingly, as to that count, we shall modify the judgment and remand for resentencing.
On January 16, 1983, defendant, who was then 25 years old, approached the victim, Veronica V., as she was making a telephone call at a phone booth at approximately 4 a.m. Pretending to be a private investigator hired by her parents to find her, defendant handcuffed the victim and forced her into his car; he then drove her to an isolated area in Sacramento County where he raped and orally copulated her.
The sentencing court imposed the upper term of eight years on the rape count. It then also imposed the upper term of eight years on the oral copulation count and ordered that sentence to be served as a full, separate and consecutive term, presumably under subdivision (c) of section 667.6. Finally, the court added a five-year consecutive enhancement under section 667.6, subdivision (a), for the prior rape conviction.

I
(1a) In essence, defendant contends that his plea of guilty to oral copulation with a person under 14 years of age was fatally defective because the complaint expressly alleged the victim was 15 years old. He therefore argues that he cannot, consistent with due process, be sentenced on his plea to that deficient charge. The complaint inconsistently alleged that defendant committed an act of oral copulation "with Veronica V[.], a person under the age of fourteen years and more than ten years younger than the said defendant, to wit, Fifteen years." The Attorney General apparently concedes that the victim was in fact 15 years old at the time of the commission of the offenses. She was so described to the magistrate at the time of the plea, in the prosecutor's statement of aggravation and in the probation report. The Attorney General does not assert otherwise in this appeal. This, then, is not a case of a clerical error in the allegation of the victim's age. It is, instead, a case of legal impossibility; because the victim was over 14 years of age, no assailant could commit the crime charged. (2), (1b) Just *1094 as it is impossible for a person to commit the crime of conspiracy by conspiring with himself (see People v. Superior Court (Jackson) (1975) 44 Cal. App.3d 494, 498 [118 Cal. Rptr. 702]), so too is it legally impossible to commit the crime of oral copulation of a minor under 14 years of age when the victim is 15. Irrespective of the actor's intent or purpose, conspiracy takes at least two parties and this form of criminal oral copulation takes a person under 14. In short, the charged crime can only be perpetrated upon someone 13 years old or younger.
(3) The term "legal impossibility," as applied to a choate crime, is merely a catch phrase for saying that, as a matter of law, the statute under which the defendant is charged does not prohibit his conduct. "In a literal sense, there is no such thing as `legal impossibility' because any behavior and any conduct can be made criminal. What is meant is the distinction between conduct which has been forbidden in penal law and conduct which is legal. `Legal impossibility' is therefore only an awkward expression of the principle of legality." (Hall, General Principles of Criminal Law (2d ed. 1960) p. 586.)[2] It follows that if the statute only prohibits certain conduct, it is legally impossible to violate it by engaging in different conduct.
(1c) Since it was legally impossible to commit the charged crime against the overaged victim, the trial court acted in excess of its jurisdiction when it imposed sentence for that crime. (People v. Mutch (1971) 4 Cal.3d 389, 395-396 [93 Cal. Rptr. 721, 482 P.2d 633]; see also People v. McGee (1934) 1 Cal.2d 611 [36 P.2d 378] [court lacks jurisdiction when accusatory pleading shows statute of limitations has run]; see generally Witkin, Cal. Criminal Procedure (1963) Jurisdiction to Act (Excess of Jurisdiction), § 28, p. 32.) (4a) But notwithstanding that error, defendant cannot raise this jurisdictional issue on appeal because he did not request or procure a certificate of probable cause. (Pen. Code, § 1237.5; People v. Shults (1984) 151 Cal. App.3d 714, 719 [199 Cal. Rptr. 33]; People v. Padfield (1982) 136 Cal. App.3d 218, 223-224 [185 Cal. Rptr. 903].)[3] (5) "After [a *1095 guilty] plea the only issues which may be considered on appeal are those based upon constitutional, jurisdictional, or other grounds going to the legality of the proceedings and those only when the statutory requisites of Penal Code section 1237.5 are fulfilled." (People v. Padfield, supra, 136 Cal. App.3d at p. 224.) However, in rare cases, because of the jurisdictional challenge involved and the inherent and incurable defect in the prosecution, an appellate court may appropriately treat a barred appeal as a petition for writ of habeas corpus. (See People v. Vest (1974) 43 Cal. App.3d 728, 731-732 [118 Cal. Rptr. 84] [appeal treated as habeas corpus]; People v. McMillan (1971) 15 Cal. App.3d 576, 578 [93 Cal. Rptr. 296] [same].) "Where, as here, the record shows without doubt that a defendant has pleaded guilty to a crime which he did not commit, the courts should hesitate to apply technical rules to prevent such defendant from obtaining relief." (In re Scruggs (1971) 15 Cal. App.3d 290, 294 [93 Cal. Rptr. 119].) (6) (See fn. 4.), (4b) Guided by that admonition, we deem this to be a proper case to treat the nonappealable portion of the appeal as a petition for writ of habeas corpus.[4] We therefore now turn to the merits of the contention.
(7, 8) (See fn. 5.) Habeas corpus relief has repeatedly been granted on grounds of inadequacy of counsel when petitioners, "on the advice of counsel, entered pleas of guilty to crimes which could not have been committed by them due to legal impossibility. [Citations.]" (In re Madrid (1971) 19 Cal. App.3d 996, 1001 [97 Cal. Rptr. 354].)[5] (9) In short, "a defendant *1096 is entitled to habeas corpus if there is no material dispute as to the facts relating to his conviction and if it appears that the statute under which he was convicted did not prohibit his conduct. [Citations.]" (In re Zerbe (1964) 60 Cal.2d 666, 668 [36 Cal. Rptr. 286, 388 P.2d 182, 10 A.L.R.3d 840]; accord In re Crumpton (1973) 9 Cal.3d 463, 467 [106 Cal. Rptr. 770, 507 P.2d 74].)
(1d) The Attorney General seeks to avoid this legal impossibility by arguing that section 288a, subdivision (c) is not limited to victims under 14. That subdivision, as we have noted in the margin, also proscribes oral copulation of a victim of any age when it is "accomplished against the victim's will by means of force, violence, duress, [or] menace...." Because the use of force was included in the factual basis recited by the prosecutor at the time defendant entered his plea, the Attorney General contends that defendant admitted committing the crime of oral copulation by force. The flaw in that argument is that the omission of an allegation of force in the complaint deprived defendant of any notice that he was charged with, much less that he was pleading guilty to, the offense of forcible oral copulation. (10) It is true that a plea of guilty "is deemed to constitute a judicial admission of every element of the offense charged." (People v. Chadd (1981) 28 Cal.3d 739, 748 [170 Cal. Rptr. 798, 621 P.2d 837].) But that admission acknowledges only the commission of the offense as charged, not as it might have been charged. California courts have long held that a plea of guilty to an accusatory pleading admits only such allegations as are actually charged. (See, e.g., In re Tarter (1959) 52 Cal.2d 250, 256-257 [339 P.2d 553]; People v. James (1978) 88 Cal. App.3d 150, 161 [151 Cal. Rptr. 354].) Where a crime can be committed in a variety of ways and only one of those ways has been pled, a plea of guilty does not admit that the offense was committed in all of the possible statutory ways. Section 954 permits the prosecutor to charge in one accusatory pleading "different statements of the same offense ..., under separate counts, ... [and] the defendant may be convicted of any number of the offenses charged...." But when the prosecutor fails to charge different statements of the same offense, the defendant *1097 can be convicted by his plea only of the crime as it is actually pled. (1e) The complaint here only charged oral copulation of a minor under 14 and did not alternatively allege that the offense was also committed by force. Thus the only crime defendant could be convicted of by his plea of guilty was that of nonforcible oral copulation of a minor under 14 or any offense which is necessarily included within that crime. Since it was legally impossible to commit the crime charged, the conviction cannot stand.
(11), (1f) Because defendant could not lawfully be convicted of the crime charged, we next inquire whether he could be convicted by his plea of any lesser included offense.[6] "When the record reveals that the defendant cannot be held for the crimes for which he was convicted and sentenced but that he may properly be convicted of the crime charged but of a lesser degree or of a lesser included offense, [the appellate] court has authority to reduce the judgment accordingly." (People v. Enriquez (1967) 65 Cal.2d 746, 749 [56 Cal. Rptr. 334, 423 P.2d 262]; see also People v. John (1983) 149 Cal. App.3d 798, 807 [197 Cal. Rptr. 340].) In Enriquez defendant pled guilty to two felony charges of issuing checks without sufficient funds after the Legislature had amended the statute to increase the amount necessary to constitute a felony. Under this ameliorative amendment, defendant could only be convicted of two misdemeanors. The Supreme Court consequently ordered the judgment modified to reflect conviction of the two misdemeanor violations. Consequently, defendant, by his guilty plea to the greater charge, may properly be convicted of any other included offense which is not barred by the doctrine of legal impossibility. (People v. Enriquez, supra, 65 Cal.2d at p. 749; see also §§ 1181, subd. 6; 1260; Witkin, Cal. Criminal Procedure (1963) Appeal, § 730, pp. 701-702.)
(12) The test of a necessarily included offense, when the specific language of pleading does not otherwise give notice of the lesser charge, is simply this: where an offense cannot be committed without necessarily committing another offense, the latter is a necessarily included offense. (People v. Lohbauer (1981) 29 Cal.3d 364, 369 [173 Cal. Rptr. 453, 627 P.2d 183].) (13) Section 288a, subdivision (b)(1), provides in relevant part that "any person who participates in an act of oral copulation with another person who is under 18 years of age" is guilty of a crime. This offense is a necessarily included offense of that part of section 288a, subdivision (c), which *1098 prohibits "[a]ny person [from] participat[ing] in an act of oral copulation with another person who is under 14 years of age and more than 10 years younger than he...." By logical imperative, it necessarily follows if one commits oral copulation with a minor under 14, one also commits that act with a person under 18. (1g) By his plea of guilty, defendant necessarily admitted that he committed an act of oral copulation with a girl 15 years of age and thus also admitted committing the included offense of oral copulation with a person under 18. We therefore shall modify the judgment to reflect a conviction for the lesser included offense.

II
(14) As we have noted in the margin, the requirements of section 1237.5 do not apply to errors alleged to have occurred at sentencing proceedings following the entry of the guilty plea. (People v. Ward (1967) 66 Cal.2d 571, 574 [58 Cal. Rptr. 313, 426 P.2d 881]; People v. Pinon (1979) 96 Cal. App.3d 904, 910 [158 Cal. Rptr. 425].) Consequently, we now consider one of the several issues raised by defendant regarding his sentencing. (15a) On the sentencing issues, defendant first contends there was an improper dual use of facts on the rape count because the court used the fact that he was on parole for a prior rape conviction at the time of the offense to justify the aggravated upper term, and then also used the fact of the prior rape conviction in imposing an consecutive term enhancement under section 667.6, subdivision (a). (See Cal. Rules of Court, rule 421(b)(4); all further references to rules are to the California Rules of Court.) (16) The statutory proscription against the dual use of facts is found in section 1170, subdivision (b). By its terms, that section does not apply to sentences imposed under section 667.6. (People v. Reeder (1984) 152 Cal. App.3d 900, 920 [200 Cal. Rptr. 479].)[7] Nevertheless, as we explained in Reeder, the proscription against dual use of facts contained in rule 441(c), unlike the statute, "applies to all enhancements, and hence to all consecutive sentences, without regard to the statutory source of those enhancements." (Reeder, supra, at p. 919.) (15b) Although the dual use of facts rule consequently applies to this case, it was not violated. The aggravating factor that defendant was on parole when he committed these crimes reflects the breach of the terms of his special custodial status; the consecutive enhancement, on the other hand, was imposed for the repeated commission of forcible sex offenses within a period of time specified in section 667.6, subdivision (a). Palpably different factors are involved. (See People v. Hurley (1983) 144 Cal. App.3d 706, 713 [192 Cal. Rptr. 805]; People v. Pinon, *1099 supra, 96 Cal. App.3d at pp. 910-911.) Indeed, the sentencing rules list the fact that "defendant has served prior prison terms" as a separate and distinct circumstance in aggravation from the fact that he was "on parole when he committed the crime." (Rule 421(b)(3), (4).) Since the fact of being on parole is different from the fact of having suffered a prior conviction for a violent sex offense, no dual use of facts occurred here.[8]
Defendant raises other errors relating to the consecutive sentence. Since he will be resentenced for a different crime on remand, those claimed errors are unlikely to arise again and for that reason we do not now address them.
The judgment of conviction as to count II (forcible rape) with the enhancement for the prior rape conviction is affirmed. That portion of the appeal relating to the propriety of imposing sentence on the oral copulation count is dismissed. Treating that issue as raised by a petition for habeas corpus, the petition is granted and the judgment as to count III (oral copulation of minor under 14 by an adult 10 years older in violation of section 288a, subdivision (c)), is modified by reducing the conviction to a conviction for violation of section 288a, subdivision (b)(1). As so modified, the judgment as to that count is also affirmed. The cause is remanded to the trial court with directions to resentence the defendant on the modified judgment as provided by law.
Puglia, P.J., and Blease, J., concurred.
NOTES
[1]  Penal Code section 288a, subdivision (c) provides: "Any person who participates in an act of oral copulation with another person who is under 14 years of age and more than 10 years younger than he, or when the act is accomplished against the victim's will by means of force, violence, duress, menace, or fear of immediate and unlawful bodily injury on the victim or another person shall be punished by imprisonment in the state prison for three, six or eight years."

All further statutory references are to the Penal Code.
[2]  Professor Hall's observation that any behavior or conduct can be made criminal is subject to the caveat that there are constitutional restrictions on the government's power to proscribe conduct by enacting penal laws. (See, e.g., Robinson v. California (1962) 370 U.S. 660, 666-667 [8 L.Ed.2d 758, 763, 82 S.Ct. 1417].) We have, however, no occasion to explore the boundaries of those restrictions in this case.
[3]  Section 1237.5 provides that "[n]o appeal shall be taken by defendant from a judgment of conviction upon a plea of guilty ... except where: [¶] (a) The defendant has filed with the trial court a written statement, ... showing reasonable constitutional, jurisdictional, or other grounds going to the legality of the proceedings; and [¶] (b) The trial court has executed and filed a certificate of probable cause for such appeal with the county clerk." California Rules of Court, rule 31(d) further provides that "[i]f the appeal from a judgment of conviction entered upon a plea of guilty ... is based solely upon ... grounds occurring after entry of such plea which do not challenge the validity of the plea ..., the provisions of section 1237.5 of the Penal Code requiring a statement by the defendant and a certificate of probable cause by the trial court are inapplicable, but the appeal shall not be operative unless the notice of appeal states that it is based upon such grounds." In his notice of appeal, filed in propria persona, defendant asserted that his appeal was "based solely on sentencing error which occurred after entry of the plea and does not challenge the validity of the plea." By so limiting his appeal, defendant averted the necessity of obtaining a certificate of probable cause under section 1237.5. (People v. Ward (1967) 66 Cal.2d 571, 574 [58 Cal. Rptr. 313, 426 P.2d 881].) After the filing of briefs, this court on its own motion requested additional briefing on the "apparent deficiency in the factual basis for defendant's plea of guilty entered to Count Three [charging oral copulation of a minor under 14] of the complaint...." Counsel for defendant, responding to the court's request, now understandably seeks to enlarge the appeal by attacking the validity of defendant's plea and his resultant conviction for the oral copulation count on the ground that the "undisputed facts show defendant's conduct was not prohibited by the statute under which he was convicted." Such a contention obviously challenges the validity of the plea and hence can be raised on appeal only if a certificate of probable cause has been first obtained. But since this court raised the issue on its own motion, it is only fair that we should address it on habeas corpus.
[4]  We recognize, indeed often preach, that judicial economy is rarely an adequate excuse for circumventing the requirements of section 1237.5. (See In re Chadwick C. (1982) 137 Cal. App.3d 173, 178 [186 Cal. Rptr. 827]; People v. Pinon (1979) 96 Cal. App.3d 904, 909 [158 Cal. Rptr. 425].) But in an extreme case, such as legal impossibility, where the conviction cannot withstand scrutiny in any procedural context, we act not out of concern for judicial economy but rather to prevent a fundamental miscarriage of justice. (Cal. Const., art. VI, § 13.)
[5]  As the Supreme Court noted in People v. Fosselman (1983) 33 Cal.3d 572, 581-582 [189 Cal. Rptr. 855, 659 P.2d 1144], "[r]eviewing courts will reverse convictions on the ground of inadequate counsel only if the record on appeal affirmatively discloses that counsel had no rational tactical purpose for his act or omission. In all other cases the conviction will be affirmed and the defendant relegated to habeas corpus proceedings at which evidence dehors the record may be taken to determine the basis, if any, for counsel's conduct or omission." However, since the material facts on the victim's age are not in dispute, we may resolve that issue on habeas corpus without resort to an evidentiary hearing on that question. (People v. Green (1980) 27 Cal.3d 1, 44 [164 Cal. Rptr. 1, 609 P.2d 468].) Moreover, under the record of this case, there is no conceivable tactical reason for counsel to permit his client to plead guilty to a crime which, because of legal impossibility, he could not commit. An evidentiary hearing on that question would therefore also be superfluous. Defendant has therefore met his burden of proving the ineffectiveness of his trial counsel by establishing "that his counsel failed to perform with reasonable competence and that it is reasonably probable a determination more favorable to the defendant would have resulted in the absence of counsel's failings." (People v. Fosselman, supra, 33 Cal.3d at p. 584.)
[6]  Section 1260 empowers the appellate court to "reverse, affirm, or modify a judgment ..., or reduce the degree of the offense or attempted offense or the punishment imposed...." Thus, an appellate court is not restricted to the remedies of affirming or reversing a judgment of conviction. Where the reversible error goes only to the issue of whether the greater offense may stand, the appellate court may reduce the conviction to the lesser offense and affirm the judgment as modified, thereby averting the necessity for a retrial. (People v. Alexander (1983) 140 Cal. App.3d 647, 666 [189 Cal. Rptr. 906].)
[7]  Section 1170, subdivision (b), provides in relevant part: "The court may not impose an upper term by using the fact of any enhancement upon which sentence is imposed under Section 667.5, 1170.1, 12022, 12022.5, 12022.6, or 12022.7."
[8]  Defendant's reliance on People v. Simpson (1981) 120 Cal. App.3d 772 [174 Cal. Rptr. 790] is obviously misplaced. There the court justified the imposition of the upper term because of the aggravating circumstance that defendant was on parole when he committed the offense (rule 421(b)(4).); it then enhanced that term because he had served a prior prison term. (§ 667.6, subd. (b).) Defendant contended on appeal that the sentencing court's action violated the proscription against the dual use of a single fact. Because there were six other valid and uncontested factors in aggravation, the Court of Appeal "resist[ed] the opportunity to give our advisory solution to the posed question because [defendant] can in no way benefit by such an analysis." (Simpson, supra, at p. 774.) Simpson has no precedential effect on this issue because cases simply are not authority for propositions not considered. (People v. Ceballos (1974) 12 Cal.3d 470, 481 [116 Cal. Rptr. 233, 526 P.2d 241].)
