
221 P.3d 12 (2009)
Edward A. WOOLEY, Appellant,
v.
STATE of Alaska, Appellee.
No. A-9335.
Court of Appeals of Alaska.
December 11, 2009.
*13 Colleen A. Libbey, Libbey Law Offices, Anchorage, for the Appellant.
Diane L. Wendlandt, Assistant Attorney General, Office of Special Prosecutions and Appeals, Anchorage, and Richard A. Svobodny, Acting Attorney General, Juneau, for the Appellee.
Before: COATS, Chief Judge, and MANNHEIMER and BOLGER, Judges.

OPINION
MANNHEIMER, Judge.
In this appeal, we are asked to clarify what the legislature meant when they provided, in AS 11.46.130(a)(6), that a theft of property valued at between $50 and $500 would be enhanced by one degree  from third-degree theft to second-degree theft  if, within the preceding five years, the defendant has been convicted and sentenced for first-, second-, or third-degree theft "on two or more separate occasions".
For the reasons explained in this opinion, we conclude that this statutory language should be interpreted as codifying the rule set forth in State v. Carlson, 560 P.2d 26, 29-30 (Alaska 1977), for identifying habitual offenders under Alaska's former criminal code  the same rule that is currently codified in AS 12.55.145(a)(2)(B) for identifying those repeat defendants who are subject to increased penalties under AS 12.55.125(l).
Specifically, we interpret AS 11.46.130(a)(6) to mean that a theft which would normally be of the third degree will be enhanced to a theft of the second degree if, within the preceding five years, the defendant was convicted and sentenced for one theft, then committed another theft and was convicted and sentenced for it, and then committed the current theft.

The underlying facts and procedural background of this case
On February 12, 2002, Edward A. Wooley stole a jigsaw from a hardware store in Eagle *14 River. Because this saw was valued at slightly less than $300, Wooley's crime would normally have been a misdemeanor: third-degree theft under AS 11.46.140(a)(1). However, Wooley had prior convictions for theft. In particular, on March 28, 1997  that is, within the five years preceding his theft of the jigsaw  Wooley was sentenced for two separate thefts. (One of these thefts was committed in September 1996, and the other was committed in November 1996, but the judgements for both of these thefts were entered on the same day: March 28, 1997.)
In addition to the theft of the jigsaw, Wooley also faced charges stemming from another attempted theft and from an alleged act of witness tampering. To resolve all of these charges, Wooley entered into a plea agreement with the State. Under the terms of this bargain, the State dropped the attempted theft and the witness tampering charges, and Wooley pleaded guilty to second-degree theft (a felony) under AS 11.46.130(a)(6).
Under this statute, a theft of property valued at between $50 and $500  that is, a theft that would normally be a misdemeanor  becomes a class C felony "[if] within the preceding five years the [defendant] has been convicted and sentenced on two or more separate occasions" for first-, second-, or third-degree theft. As part of his plea bargain, Wooley stipulated that the two thefts he committed in 1996 were the predicate thefts that would support a felony charge under this statute.
However, in February 2004, Wooley (now represented by a new attorney) filed a petition for post-conviction relief in which he argued that his sentence was illegal and that his former attorney represented him incompetently. Specifically, Wooley argued that his attorney failed to see that, as a matter of law, Wooley's two prior theft convictions were too old to support a felony theft charge under AS 11.46.130(a)(6).
As we explained above, judgement was entered against Wooley for these two thefts on March 28, 1997  within the five years preceding his theft of the jigsaw on February 12, 2002. But Wooley argued that the date of his sentencing was not the determinative date for purposes of the statute. Instead, Wooley argued, the crucial date was the date on which the defendant was found to be factually guilty of the prior theft  either the date on which the jury returned its guilty verdict, or the date on which the defendant entered a guilty plea.
The superior court rejected this argument and denied Wooley's petition for post-conviction relief. Wooley then appealed to this Court.
In our previous decision in this case, Wooley v. State, 157 P.3d 1064 (Alaska App.2007), we held that, for purposes of the five-year period specified in AS 11.46.130(a)(6), a defendant is "convicted and sentenced" on the day that the court enters judgement against the defendant  as opposed to the day on which a jury finds the defendant guilty, or the day on which the defendant enters a guilty plea to the charge. We therefore concluded that even though Wooley pleaded guilty to the two prior thefts in December 1996 and in January 1997 (two dates outside the five-year statutory period), the date that mattered was the date on which judgement was entered against Wooley on these two theft convictions. That date was March 28, 1997  a date within the five-year period.
Following our decision of this point, Wooley petitioned the Alaska Supreme Court to hear his case. The supreme court granted hearing and directed us to consider one further issue in Wooley's case.
As we explained earlier in this opinion, AS 11.46.130(a)(6) applies to cases where the defendant has previously been convicted and sentenced for first-, second-, or third-degree theft "on two or more separate occasions" within the five years preceding the defendant's commission of the current theft. Because the judgements for both of Wooley's prior thefts were entered on the same day (March 28, 1997), the supreme court asked us to decide whether Wooley had been convicted and sentenced for theft "on two or more separate occasions" within the meaning of AS 11.46.130(a)(6).


The legal background of this case: the competing rules of interpretation adopted in State v. Carlson and State v. Rastopsoff

Legislatures often enact higher penalties for repeat criminal offenders  for example, *15 by making a repeat offense a higher degree of crime, or by providing an increased mandatory minimum penalty for a repeat offense. But these statutes sometimes fail to precisely define which defendants qualify as repeat offenders.
Thirty years ago, the Alaska Supreme Court faced this problem in State v. Carlson, 560 P.2d 26 (Alaska 1977). The issue in Carlson was how to interpret the "habitual criminal" statute that was part of Alaska's pre-1980 criminal code. This statute, former AS 12.55.050, established a system of progressively greater penalties for felony offenders who had "previously been convicted" of one, two, or three felonies.[1]
The defendant in State v. Carlson, a man named Tyrone Davenport, had committed four felonies. Davenport committed the first of these felonies in 1969, and he was sentenced for this crime that same year.[2] In 1971, Davenport committed two more felonies. Although these crimes were committed on separate occasions, Davenport was sentenced for both crimes on the same day (in early 1972).[3] Then, in mid-1975, Davenport committed a fourth felony.[4]
The State argued that Davenport fell within the statutory category of defendants who had "previously been convicted of three or more felonies", and that Davenport should therefore be sentenced under subsection (3) of the habitual criminal statute. In other words, the State argued that Davenport's minimum sentence was 20 years' imprisonment and his maximum sentence was life imprisonment.[5]
When Superior Court Judge Victor D. Carlson refused to sentence Davenport under subsection (3) of the statute, and instead imposed a sentence of only 5 years' imprisonment, the State sought a writ of mandamus from the supreme court.[6]
The supreme court rejected the State's position that a defendant's status as a second, third, or fourth offender should be determined by simply counting up the number of the defendant's prior offenses. The court concluded that such a rule would run counter to the policy underlying habitual offender statutes:
Habitual criminal statutes are founded on the general principle that persistent offenders should be subject to greater sanctions than those who have been convicted only once. These statutes serve as a warning to first time offenders and provide them with an opportunity to reform. It is only upon subsequent convictions for repeated criminal conduct that increasingly stiffer sentences are imposed. The reason the sanctions become increasingly severe is not so much that the defendant has sinned more than once[, but] that he is deemed incorrigible when he persists in violations of the law after conviction of previous infractions.
Carlson, 560 P.2d at 28-29 (footnotes and internal citations and quotations omitted).
The supreme court therefore held that the increased penalties provided for repeat offenders under the habitual criminal statute only applied if the defendant's later offense was committed after judgement was entered *16 on the defendant's prior offense. Carlson, 560 P.2d at 30. In other words, "where the sequence of prior convictions is in issue, the rule ... is that each successive felony must be committed after the previous felony conviction in order to count towards habitual criminal status." Id. at 29.
The court explained that the harsher penalties of the habitual criminal statute were intended to be applied in cases where "a convicted criminal has not taken advantage of the opportunity to reform and subsequently commits another crime". Id. at 30. In Davenport's case, because two of his convictions were entered on the same day, "the opportunity for reformation [stemming from those convictions was] afforded to him only once, not twice." Id. Thus, the court concluded, even though Davenport had (as a factual matter) committed three felonies before he committed his current offense, he should have been sentenced under subsection (2) of the statute  the subsection that set forth the penalty range for a defendant "previously... convicted of two felonies". Id.
The following year, in Gonzales v. State, 582 P.2d 630, 636 (Alaska 1978), the supreme court applied this same rule of construction to former AS 17.10.200, a statute which imposed increasingly severe penalties on drug offenders for a "second offense" and for a "third or subsequent offense".
We now return to the statutory language at issue in Wooley's case: the language found in AS 11.46.130(a)(6), which defines a repeat theft offender as someone who "has been convicted and sentenced on two or more separate occasions" for first-, second-, or third-degree theft within the preceding 5 years.
If the phrase "sentenced on two or more separate occasions" was intended to codify the Carlson rule  and, on its face, the language appears to be consistent with that rule  then Wooley's two prior theft convictions would not support a prosecution or conviction for felony theft under AS 11.46.130(a)(6). Within the five years preceding his current offense, Wooley has been sentenced only once for theft. (The judgements for his previous two thefts were both entered on the same day.) Thus, like the defendant in Carlson, Wooley has only once, and not twice, failed to take advantage of an opportunity for reformation.
But the situation is complicated because two more recent Alaska statutes  that is, two statutes passed after the Carlson decision  have been interpreted as codifying a different rule for assessing a defendant's status as a repeat offender.
In January 1980, Alaska's current criminal code took effect.[7] In place of the habitual felony offender statute (which was repealed), the legislature enacted a presumptive sentencing scheme that subjects defendants to increasing presumptive terms (or, now, increasing presumptive ranges of imprisonment) if the defendant is being sentenced for a "second felony conviction" or a "third felony conviction" as those terms are defined in AS 12.55.185.
Under this statute, "`second felony conviction' means that the defendant previously has been convicted of a felony",[8] and "`third felony conviction' means that the defendant has been at least twice previously convicted of a felony".[9] In State v. Rastopsoff, 659 P.2d 630 (Alaska App.1983), this Court had to decide whether the wording of the new presumptive sentencing statute, "twice previously convicted of a felony", should be interpreted in conformity with the Carlson rule  that is, whether this new language should be interpreted as meaning the same thing as the phrase "previously ... convicted of two felonies" that appeared in the old habitual criminal statute.
In Rastopsoff, this Court engaged in a lengthy, detailed analysis of the language, statutory history, and legislative commentary accompanying the presumptive sentencing statutes. See 659 P.2d at 635-640. Based on this analysis, we concluded that the presumptive sentencing statutes were intended to codify a modified version of the Carlson rule.
*17 We held that, under the new sentencing statutes, a defendant's prior felony convictions could not be used to alter the defendant's presumptive sentencing status unless the defendant's current felony offense was committed after the defendant was sentenced for the previous felonies. Rastopsoff, 659 P.2d at 640-41. This aspect of the new statutes was a continuation of the Carlson rule. However, we held that the new sentencing statutes departed from the Carlson rule in that the new statutes required proof of only one earlier opportunity for reformation. Thus, if a defendant was sentenced at a single proceeding for two separate felonies (as defined in AS 12.55.145(a)), and if the defendant thereafter committed another felony, this later felony would be deemed the defendant's "third felony conviction". Id. at 640.
Four years after Rastopsoff, in Tulowetzke v. Division of Motor Vehicles, 743 P.2d 368 (Alaska 1987), the Alaska Supreme Court applied the Rastopsoff rule of construction to AS 28.15.181(c), a statute that specifies increasing mandatory minimum periods of license revocation for drivers convicted of driving under the influence, depending on whether the driver has been "previously convicted once" or "previously convicted twice" or "previously convicted more than twice".
AS 28.15.181(c) does not define the phrase "previously convicted", but the supreme court concluded that this phrase should be interpreted to mean the same thing as the corresponding phrase in the presumptive sentencing statutes that this Court construed in Rastopsoff. The supreme court reached this conclusion because both statutes deal with the same problem (recidivism), both statutes were enacted during the same legislative session (1978), and both statutes employ essentially the same language to describe the recidivist offenders who are subject to the increased penalties. Tulowetzke, 743 P.2d at 370.
The supreme court noted that, in Rastopsoff, we interpreted this language to mean "that prior convictions which [do] not arise out of the same criminal episode must [later] be counted separately for presumptive sentencing purposes, even if the convictions were entered on the same day." Tulowetzke, 743 P.2d at 371. The supreme court then declared, "We agree with the court of appeals' analysis ... and [we] apply the same analysis to AS 28.15.181(c). Thus, ... all [of a defendant's] prior DWI convictions must be counted separately for purposes of [determining the minimum] driver's license revocation following a subsequent conviction, regardless of whether the prior convictions were entered simultaneously." Id.


Why we interpret the statutory phrase "convicted and sentenced on two or more separate occasions" as embodying the rule of State v. Carlson

Because the decisions in Rastopsoff and Tulowetzke departed from the rule adopted earlier in Carlson, we are confronted with two competing rules of statutory interpretation for resolving the question presented in Wooley's case  the question of who can be prosecuted for felony theft as a third offender under AS 11.46.130(a)(6).
Under the Carlson rule, Wooley is only a second offender, and his two prior theft convictions count as only one. Wooley committed both of the prior thefts before he was sentenced on either of them. Thus, Wooley had only one opportunity for reformation before he committed his current offense. But under the Rastopsoff-Tulowetzke rule, this one opportunity for reformation is all that is required. Because Wooley committed another theft after receiving this opportunity for reformation, and because his two prior convictions arise from separate incidents, his two prior convictions are counted separately and he is a third offender.
(We note that, conceivably, there is a third way to interpret the phrase "sentenced on two or more separate occasions". This language might be read as describing neither the Carlson rule nor the Rastopsoff rule, but rather all situations where the sentencings on a defendant's prior theft offenses occurred on different days  or even at different times on the same day, if the sentencings were separated by a recess of any duration. The State does not argue that AS 11.46.130(a)(6) should be interpreted in this manner.)
*18 The State argues that we should interpret AS 11.46.130(a)(6) in conformity with the Rastopsoff-Tulowetzke rule because that was the prevailing rule in 1988, when the legislature added subsection (a)(6) to AS 11.46.130. This argument would have considerably more force if the legislature had written subsection (a)(6) using the same phrase, "previously convicted", that was construed in Rastopsoff and Tulowetzke. But subsection (a)(6) uses a different formula: "convicted and sentenced on two or more separate occasions".
The State's position is further weakened by the fact that the original version of subsection (a)(6)  House Bill 461, 15th Legislature  did contain wording similar to the statutes at issue in Rastopsoff and Tulowetzke. As originally proposed, subsection (a)(6) would have authorized felony prosecution of what would otherwise be a misdemeanor theft if, within the preceding five years,
[the defendant] has been convicted three or more times [of first-, second-, or third-degree theft] or an offense [in another jurisdiction] under another law or ordinance with substantially similar elements.
See House Bill 461 (15th Legislature), draft of February 29, 1988 (emphasis added).
But at some point between late February and mid-March 1988, the language of House Bill 461 was changed from "convicted three or more times" to "convicted and sentenced on two or more separate occasions". See House Bill 461, draft of March 17, 1988 (emphasis added).
House Bill 461 was the subject of considerable legislative discussion and public comment, but none of the discussion or comment addressed this change in the statutory language. The legislative record (the committee minutes, the internal memoranda, and other pertinent documentation) offers no explanation, either explicit or implicit, for this alteration of the formula for determining which defendants would be subject to felony prosecution as repeat offenders.
The State argues that this silent record supports the conclusion that the legislature did not think they were doing anything remarkable  and thus we should interpret the silent record to mean that the legislature thought the new statute would be construed in the same manner as the statutes at issue in Rastopsoff and Tulowetzke.
But there are other conclusions that might reasonably be drawn. Here, the legislature started out with statutory language similar to the language that had been previously construed under the Rastopsoff-Tulowetzke rule  and then the legislature replaced this language with a new formula that, at least facially, appears to codify the Carlson rule.
Moreover, the legislature did not simply change the statutory description of the predicate prior convictions. The legislature also changed the minimum number of prior convictions that would trigger the higher degree of offense  reducing this minimum number from three to two.
When these two changes are considered together, one reasonable conclusion is that the legislature initially intended to require proof of three prior convictions under the Rastopsoff-Tulowetzke rule, and then the legislature changed its mind and decided to reduce the required number of prior convictions, but to concomitantly require the State to satisfy the Carlson rule. In other words, under the initial language, the State would have to prove that the defendant had at least three prior theft convictions, but the State would only have to prove that the defendant had a single prior opportunity to reform. Under the amended language, the State would only have to prove two prior theft convictions, but the State would have to prove that the defendant had a separate opportunity to reform after each of those convictions.
The language of AS 11.46.130(a)(6) is fully consistent with this interpretation. Indeed, the statutory language is seemingly inconsistent with the State's contrary interpretation.
Finally, we note that in 1996, eight years after the legislature enacted AS 11.46.130(a)(6), the legislature enacted another recidivist statute that expressly codifies the Carlson rule as the method for determining which offenders should be subjected to increased penalties for recidivism. See SLA 1996, ch. 7, §§ 7-8.
*19 Section 7 of this session law enacted AS 12.55.125(l), which provides for greatly increased penalties for certain repeat felony offenders:
Notwithstanding any other provision of law, a defendant [who is] convicted of an unclassified or class A felony offense, and [who is] not subject to a mandatory 99-year sentence under [AS 12.55.125(a)], shall be sentenced to a definite term of imprisonment of 99 years when the defendant has been previously convicted of two or more most serious felonies.
This is a modern-day version of the old habitual criminal statute that was construed in Carlson, and the legislature declared that the goals of this new statute were to "(1) improve public safety by placing the most dangerous criminals in prison; (2) reduce the number of serious, repeat offenders by tougher sentencing; (3) set proper and simplified sentencing practices that both victims and persistent offenders can understand; and (4) restore public trust in our criminal justice system"  all traditional goals of recidivist offender statutes. See SLA 1996, ch. 7, § 1.
From an appellate judge's point of view (and from a sentencing judge's point of view), the wording of AS 12.55.125(l) immediately raises the question: How do we determine whether a defendant has been "previously convicted of two or more most serious felonies"? Fortunately, the legislature provided the answer to this question in section 8 of the session law. This section enacted AS 12.55.145(a)(2)(B)  a statute that surely ranks among the paragons of legislative clarity:
For purposes of considering prior convictions in imposing sentence under ... AS 12.55.125(l),
. . .
(B) commission of and conviction for offenses relied on as prior most serious felony offenses must occur in the following order: [the] conviction for the first offense must occur before [the] commission of the second offense, and [the] conviction for the second offense must occur before [the] commission of the offense for which the defendant is being sentenced[.]
This is the Carlson rule, expressed in plain English. In other words, the legislature codified the Carlson rule as the method for determining which repeat felony offenders will be subject to the increased penalties specified in AS 12.55.125(l).
Given all of this, the best that can be said for the State's suggested interpretation of AS 11.46.130(a)(6) is that this interpretation is debatable. The wording of the statute appears to be contrary to the State's proposed interpretation. The legislative record is silent as to what the legislature intended, but it is obvious that the legislature started out with a phrasing that was similar to the language that had previously been judicially construed in Rastopsoff and Tulowetzke, and then the legislature dropped this language in favor of a new formula. And, finally, we note that the legislature has adopted and codified the Carlson test in a related context  that is, in a statute that calls for increased penalties for recidivist offenders.
When the meaning of a penal statute remains ambiguous or unclear after it has been subjected to legal analysis, the law requires us to construe the statute against the government.[10] Accordingly, we now hold that AS 11.46.130(a)(6) must be interpreted in accordance with the Carlson rule. A defendant can not be convicted under this subsection unless, within the five years preceding the defendant's current offense, (1) the defendant was sentenced for first-, second-, or third-degree theft, and then (2) the defendant committed another first-, second-, or third-degree theft and was sentenced for that theft, and then (3) the defendant committed the current theft.

The proper disposition of Wooley's case
One further issue remains to be resolved.
*20 In Wooley's petition for post-conviction relief in the superior court, he asserted that he could not lawfully be convicted of felony theft under AS 11.46.130(a)(6), and he therefore asked the superior court to set aside his felony conviction and to reduce his conviction to misdemeanor theft, with a maximum sentence of 1 year's imprisonment.
We have now concluded that, as a factual matter, the State could not have successfully prosecuted Wooley under AS 11.46.130(a)(6)  because Wooley committed his second prior offense before he was sentenced for the first prior offense. However, this does not mean that Wooley is entitled to the relief that he asked for.
As we explained toward the beginning of this opinion, Wooley's conviction under AS 11.46.130(a)(6) was the result of a plea bargain. Wooley pleaded no contest to felony theft under this statute in exchange for the State's dismissal of two other charges  an alleged attempted theft and an alleged act of witness tampering.
Even assuming that Wooley entered his plea without any inkling that he might have a defense to the felony theft charge, the fact remains that Wooley negotiated a plea agreement with the government and he obtained concessions (the dismissal of other criminal charges) as part of that bargain. Wooley is not entitled to claim the benefit of the portions of the agreement that he likes while, at the same time, mounting an attack on the portions that he does not like.
When, as in Wooley's case, a defendant wishes to challenge an already consummated plea agreement as being unlawful, or as being the result of incompetent advice received from the defendant's attorney, the defendant must seek rescission of the agreement  not selective enforcement of only those provisions favorable to the defendant. We addressed similar situations in Woodbury v. State, 151 P.3d 528, 532 (Alaska App.2007), and in Grasser v. State, 119 P.3d 1016, 1018 (Alaska App.2005).
Accordingly, we REMAND Wooley's case to the superior court. In the superior court, Wooley shall be given the opportunity to renew his petition for post-conviction relief  with the understanding that, if he is successful, his remedy is not to have the superior court reduce his theft conviction to a misdemeanor, but rather to be allowed to withdraw his no contest plea to the felony theft charge and to have the parties returned to their respective positions before the plea bargain, including reinstatement of the other criminal charges that the State dismissed as part of the plea bargain.
We do not retain jurisdiction of this case.
NOTES
[1]  Former AS 12.55.050 declared:

Increased punishment for persons convicted of more than one felony. A person convicted of a felony in this state who has been previously convicted of a felony in this state or elsewhere, if the same crime elsewhere would constitute a felony under Alaska law, is punishable as follows:
(1) If the person ... has previously been convicted of one felony, then he is punishable by imprisonment for not less than the minimum nor more than twice the longest term prescribed for the felony of which that person [currently stands] convicted.
(2) If the person has previously been convicted of two felonies, then he is punishable by imprisonment for not less than the minimum nor more than twice the longest term prescribed [in subsection (1)] for a second conviction of felony.
(3) If the person has previously been convicted of three or more felonies, then on the fourth conviction he shall be adjudged an habitual criminal, and is punishable by imprisonment for not less than 20 years nor more than the remainder of his natural life.
[2]  Carlson, 560 P.2d at 27.
[3]  Id.
[4]  Id.
[5]  Id. at 28.
[6]  Id.
[7]  The new criminal code and the new presumptive sentencing laws took effect on January 1, 1980. See SLA 1978, ch. 166, § 25.
[8]  AS 12.55.185(14).
[9]  AS 12.55.185(17).
[10]  Haywood v. State, 193 P.3d 1203, 1206 (Alaska App.2008); State v. ABC Towing, 954 P.2d 575, 579 (Alaska App. 1998).
