
193 Cal.App.3d 957 (1987)
238 Cal. Rptr. 697
THE PEOPLE, Plaintiff and Respondent,
v.
KEVIN C. BROWN, Defendant and Appellant.
Docket No. A035816.
Court of Appeals of California, First District, Division Two.
July 23, 1987.
*959 COUNSEL
Senya Ranta, under appointment by the Court of Appeal, for Defendant and Appellant.
John K. Van de Kamp, Attorney General, Steve White, Assistant Attorney General, Stan M. Helfman and Jeffrey M. Bryant, Deputy Attorneys General, for Plaintiff and Respondent.
*960 OPINION
KLINE, P.J.
Appellant was convicted of two counts of attempted grand theft from a person (Pen. Code, §§ 487, subd. 2, 664)[1] and sentenced to 46 months in state prison. On a prior appeal, the conviction was affirmed but the matter remanded for resentencing. Appellant was sentenced to a 48-month term. He now contends that the imposition of a longer sentence on remand impermissibly penalized him for his successful appeal and violated the prohibition against double jeopardy. We affirm.

STATEMENT OF THE CASE AND FACTS[2]
Appellant's original sentence was comprised of an aggravated term of eighteen months on one count of attempted grand theft (count 1); a consecutive one-third of the middle term, four months, on the other (count 2); and a twenty-four-month enhancement pursuant to section 12022.1 based on appellant's admission that one of the offenses had been committed while he was released on bail.
On appeal, Division Four of this court held in an unpublished opinion that the 46-month sentence was improper in that it exceeded the double the base term limitation of section 1170.1, subdivision (g).[3] (People v. Brown (Apr. 15, 1986) A027956.) The appellate court set forth suggestions for resentencing and remanded the case to the trial court.
Appellant was resentenced on July 14, 1986. The court imposed an aggravated term of 18 months on count 1, based on appellant's prior unsatisfactory performance on probation and the fact that the crime involved premeditation; a concurrent midterm of 12 months on count 2; a 24-month enhancement under section 12022.1, 6 months of which were stayed; and a consecutive 12-month enhancement for a prior prison term. (§ 667.5, subd. (b).) The total sentence was 48 months, 2 months longer than appellant's original sentence.


*961 DISCUSSION
(1) As a general rule, a greater sentence may not be imposed upon remand after an appeal. This rule arises from the need to "preclude vindictiveness and more generally to avoid penalizing a defendant for pursuing a successful appeal." (People v. Collins (1978) 21 Cal.3d 208, 216 [145 Cal. Rptr. 686, 577 P.2d 1026]; People v. Hood (1969) 1 Cal.3d 444, 459 [82 Cal. Rptr. 618, 462 P.2d 370]; People v. Ali (1967) 66 Cal.2d 277, 281 [57 Cal. Rptr. 348, 424 P.2d 932]; People v. Henderson (1963) 60 Cal.2d 482, 497 [35 Cal. Rptr. 77, 386 P.2d 677].)
(2) In People v. Serrato (1973) 9 Cal.3d 753, 764 [109 Cal. Rptr. 65, 512 P.2d 289], however, the Supreme Court held that this general rule is inapplicable to cases involving unauthorized sentences. Without directly addressing the effect of the exception on defendants' rights to appeal, Serrato stated that an unauthorized sentence "is subject to being set aside judicially and is no bar to the imposition of a proper judgment thereafter, even though it is more severe than the original unauthorized pronouncement.... [A] defendant who successfully attacks a judgment which is in excess of the court's jurisdiction is not necessarily entitled to claim the protection of that invalid judgment as an absolute limitation upon what the court may do thereafter." (Id., at pp. 764-765, fn. omitted.)
Serrato thus set up a distinction between resentencing upon retrial necessitated by an error not involving the sentence and resentencing necessitated by the illegality of the original sentence, allowing imposition of a greater sentence only in the latter situation. (People v. Hill (1986) 185 Cal. App.3d 831, 836 [230 Cal. Rptr. 109].) As a matter of policy, the distinction seems dubious: a defendant is penalized as much for bringing a successful appeal if he or she is left subject to imposition of a greater sentence when the basis of the appeal is sentencing error as when the basis is error relating to the conviction.
The Serrato distinction is also awkward in application. (3) In order to determine whether defendants may be given greater sentences after appeals relating to sentencing error, the Courts of Appeal distinguish illegal sentences from sentences erroneous for some other reason (People v. Price (1986) 184 Cal. App.3d 1405, 1409 [229 Cal. Rptr. 550]; People v. Foley (1985) 170 Cal. App.3d 1039, 1047 [216 Cal. Rptr. 865]). In some instances, the distinction is clear. Thus, where the sentence imposed is not authorized by the statutes governing sentencing, the sentence is illegal and no bar to subsequent imposition of a greater sentence. (People v. Price, supra, 184 Cal. App.3d 1405, 1409 [failure to impose enhancement under § 12022.3]; People v. Allen (1985) 165 Cal. App.3d 616, 630-631 [211 Cal. Rptr. 837] *962 [imposition of consecutive sentence in violation of § 669]; People v. Grimble (1981) 116 Cal. App.3d 678, 684-685 [172 Cal. Rptr. 362] [imposition of consecutive sentences in violation of § 669]; People v. Superior Court (Duran) (1978) 84 Cal. App.3d 480, 486 [148 Cal. Rptr. 698] [improper length base term sentence].) On the other hand, where a sentence is authorized by statute but the court errs in the manner of sentencing, for example, by failing to state reasons for sentencing choices, the resulting sentence is erroneous but not illegal and is a bar to subsequent imposition of a greater sentence. (People v. Price, supra, 184 Cal. App.3d at p. 1409; People v. Foley, supra, 170 Cal. App.3d at p. 1045, 1048.) In some situations, however, the distinction between illegal and otherwise erroneous sentences is less certain: for example, the Courts of Appeal seem to disagree on the characterization of a sentence which violates section 654. (People v. Price, supra, 184 Cal. App.3d at p. 1411 [unauthorized]; People v. Nick (1985) 164 Cal. App.3d 141, 145 [210 Cal. Rptr. 137] [otherwise erroneous].)
Additionally, the Serrato distinction leads to an anomalous result in the context of appeals, as a defendant is encouraged to appeal an erroneous but authorized sentence and penalized for appealing an outright illegal one. This result is contrary to the established principle that "[s]ince the state has no interest in preserving erroneous judgments, it has no interest in foreclosing appeals therefrom by imposing unreasonable conditions on the right to appeal." (People v. Henderson, supra, 60 Cal.2d at p. 497; People v. Hood, supra, 1 Cal.3d at p. 459; People v. Serrato, supra, 9 Cal.3d at p. 767 [Mosk, J., conc. and dis. opn.].)
Nevertheless, as the Supreme Court has not retracted the Serrato distinction, we are bound to follow it. (Auto Equity Sales v. Superior Court (1962) 57 Cal.2d 450, 455 [20 Cal. Rptr. 321, 369 P.2d 937].)[4] (4) In the present *963 case, the error consisted of imposing a full two-year enhancement in violation of the double the base term limitation of section 1170.1. Appellant urges that this error did not result in an "unauthorized" sentence as the trial court had the discretion to impose each part of the sentence, including the two-year enhancement, and erred only in failing to stay a portion of the enhancement. While the sentence might have been proper were it not for the limit imposed by section 1170.1, subd.(g), the fact remains that a sentence which exceeds a statutory limitation is unauthorized by the statute.
(5) (See fn. 5.) Accordingly, the error in this case resulted in an unauthorized sentence which does not bar imposition of a greater proper sentence on remand.[5]
Having concluded that appellant's sentence was proper for the reasons stated above, we need not resolve respondent's alternate argument that the guidelines set out in the first appellate decision, which the trial court followed, were binding on the trial court as law of the case. (6a) We note, however, that the doctrine does not appear to apply.
(7) The doctrine of the law of the case provides that where an appellate court opinion states a principle or rule of law necessary to the decision, that principle or rule must be adhered to in subsequent proceedings in the same case even if disagreed with by a subsequent court. (People v. Shuey (1975) 13 Cal.3d 835, 841 [120 Cal. Rptr. 83, 533 P.2d 211], quoting Tally v. Ganahl (1907) 151 Cal. 418, 421 [90 P. 1049].) When an appellate court reverses and orders further proceedings, rulings which are not essential to the decision but important for purposes of the new trial become law of the case. (Lindsey v. Meyer (1981) 125 Cal. App.3d 536, 542 [178 Cal. Rptr. 1], *964 quoting Chamberlain Co. v. Allis-Chalmers Mfg. Co. (1946) 74 Cal. App.2d 941, 942-943 [170 P.2d 85].) (8) The doctrine will not be applied, however, where it would result in a manifestly unjust decision. (People v. Medina (1972) 6 Cal.3d 484, 492 [99 Cal. Rptr. 630, 492 P.2d 686]; People v. Shuey, supra, 13 Cal.3d at p. 842; People v. Scott (1976) 16 Cal.3d 242, 246-247 [128 Cal. Rptr. 39, 546 P.2d 327]; DiGenova v. State Board of Education (1962) 57 Cal.2d 167, 179 [18 Cal. Rptr. 369, 367 P.2d 865]; England v. Hospital of Good Samaritan (1939) 14 Cal.2d 791, 795 [97 P.2d 813].)
(6b) In the present case, the appellate court's language was discretionary: the opinion suggests that "[i]f upon remand the trial court concludes that the length of the original sentence should be maintained, it may [italics added] do so by imposing [italics in original] the section 667.5, subdivision (b) enhancement..." and "the court could [italics added] sentence appellant to an aggregate term of up to three years...." (People v. Brown, supra, A027956 [nonpub. opn.].) Respondent offers no authority for the proposition that such suggestions must be followed as law of the case. Indeed, had the court found only one possible sentencing scheme, it would have modified the sentence rather than remanding for resentencing according the trial court's discretion.
The judgment is affirmed.
Rouse, J., and Benson, J., concurred in the judgment only.
A petition for a rehearing was denied August 10, 1987.
NOTES
[1]  Unless otherwise indicated, all further statutory references are to the Penal Code.
[2]  As the issue in this appeal pertains solely to sentencing error, the facts of the crime are not necessary to the resolution of the issue before us.
[3]  Section 1170.1, subdivision (g) provides: "The term of imprisonment shall not exceed twice the number of years imposed by the trial court as the base term pursuant to subdivision (b) of Section 1170 unless the defendant stands convicted of a `violent felony' as defined in subdivision (c) of Section 667.5, or a consecutive sentence is being imposed pursuant to subdivision (c) of this section, or an enhancement is imposed pursuant to Section 12022, 12022.4, 12022.5, 12022.6, 12022.7, or 12022.9 or the defendant stands convicted of felony escape from an institution in which he is lawfully confined."
[4]  The Supreme Court's decision in People v. Collins, supra, 21 Cal.3d 208, casts some doubt on the continuing vitality of the Serrato distinction. Collins reaffirms the rule that a defendant not be penalized for pursuing a successful appeal by being subjected to greater punishment on retrial. (21 Cal.3d 208, 216.) The concerns discussed in Justice Mosk's majority opinion in Collins are precisely those expressed in his dissent in Serrato, that a defendant should not have to risk the possibility of greater punishment on retrial for the privilege of exercising his right to appeal. (Id., at p. 216; People v Serrato, supra, 9 Cal.3d at pp. 767-768, Mosk, J., dis.). As we have said, the majority opinion in Serrato does not directly confront the issue of penalizing a defendant for appealing an erroneous sentence, explaining that an unauthorized sentence may be judicially set aside at any time without discussing the implications of setting aside the sentence in the context of a defendant's appeal. (9 Cal.3d at pp. 763-764.) The result allowed by the Serrato majority, and lamented in Justice Mosk's dissent, is simply irreconcilable with the views expressed in Collins: whether a defendant appeals from an invalid sentence or from a conviction, to allow a subsequent greater sentence is to penalize the successful appeal. As Collins does not address the distinction between sentence error and error in a conviction, however, we can not take it to overrule Serrato.

We note that although the majority of Court of Appeal cases follow the Serrato distinction, they similarly avoid discussion of the implications in terms of penalizing appeals. (E.g., People v. Grimble, supra, 116 Cal. App.3d at p. 685; People v. Hill, supra, 185 Cal. App.3d 831, 836; In re Shanea J. (1984) 150 Cal. App.3d 831, 846-847 [198 Cal. Rptr. 228]; People v. Hunt (1982) 133 Cal. App.3d 543, 564 [184 Cal. Rptr. 197].) Cases to the contrary apply the rule of limiting the length of postappeal sentencing to sentencing error cases without discussing the Serrato distinction. (People v. Burns (1984) 158 Cal. App.3d 1178, 1184 [205 Cal. Rptr. 356]; People v. Galvan (1986) 187 Cal. App.3d 1205, 1220 [232 Cal. Rptr. 410]; People v. Hays (1983) 147 Cal. App.3d 534, 553 [195 Cal. Rptr. 252]; In re Ditsch (1984) 162 Cal. App.3d 578, 582 [209 Cal. Rptr. 12]; People v. Gutierrez (1980) 109 Cal. App.3d 230, 233 [167 Cal. Rptr. 162].)
[5]  Appellant places great emphasis on the fact that the decision in the first appeal referred to his sentence as "improper" rather than "unauthorized" or "illegal." We see nothing in the decision to indicate that the court intended significance to attach to its choice of term. The court did not address the issue of possible limits on resentencing but merely held that the original sentence was erroneous. Even in a decision expressly considering the question of characterization of a sentencing error for purposes of defining limits of resentencing, a sentence determined to be "unauthorized" was referred to as "improper" in the context of a general discussion of the error. (People v. Nick, supra, 164 Cal. App.3d at pp. 144, 145.) In the context of identifying error, the term "improper" may be used simply as the opposite of "proper" without necessarily carrying significance for the issue of limitations on resentencing. The characterization of sentencing errors must depend on the substance of the error.
