
162 Cal.App.3d 578 (1984)
209 Cal. Rptr. 12
In re JOHN DAVID DITSCH on Habeas Corpus.
Docket No. E001368.
Court of Appeals of California, Fourth District, Division Two.
December 11, 1984.
*580 COUNSEL
John David Ditsch, in pro. per., for Petitioner.
John K. Van de Kamp, Attorney General, John W. Carney and Robert M. Foster, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
RICKLES, J.
Defendant Ditsch was convicted of second degree murder (Pen. Code, § 187) and attempted first degree murder (Pen. Code, §§ 664/187) for conduct which occurred in 1978.[1] He was sentenced that same year and resentenced in 1981 by order of this court. In 1984, Ditsch's sentence was ordered increased by the trial court. He petitions us for a writ of habeas corpus challenging both the resentencing and the increase.

FACTS
On November 22, 1978, Ditsch was sentenced for the aforementioned crimes as follows:


Base term, count II (attempted murder), midterm              6 yrs.
§ 12022.7 enhancement                                        3 yrs.
§ 12022, subd. (b) enhancement                               stayed
§ 12022.5 enhancement                                        stayed
Consecutive term, count I (murder), 1/3 the midterm of 6      2 yrs.
years 
1/3 of a § 12022.5 enhancement                                2/3 yrs.
                                                            ___________
                                                 TOTAL      11 2/3 yrs.

Ditsch appealed his conviction to this court, alleging, among other things, that the trial court had committed sentencing errors. In an unpublished opinion filed May 22, 1980, this court affirmed Ditsch's convictions but remanded the case on the ground that his conduct constituted assault with the intent to commit murder (§ 217) rather than attempted murder (§§ 664/187). The trial court was specifically ordered on remand to resentence Ditsch pursuant to section 217.[2]
*581 On July 16, 1981, the trial court resentenced defendant as follows:


Base term  count I, upper term                                 7 yrs.
§ 12022.5 enhancement                                           2 yrs.
Consecutive term  count II, 1/3 the midterm of 3 years         1 yr.
1/3 of a 12022.7 enhancement                                    1 yr.
§ 12022, subd. (b) enhancement                                  stayed
§ 12022.5 enhancement                                            stayed
                                                                 _______
                                                     TOTAL       11 yrs.

Because the trial court resentenced Ditsch on count II to one year, or one-third the midterm of three years, there is no doubt that section 217 was applied. Had section 664 been utilized instead, the sentence on count II would have been two years, or one-third the midterm of six years. (See fn. 1, ante.) The trial court did not, however, amend the abstract of judgment to reflect the application of section 217. That document continued to indicate that Ditsch had been convicted of and punished for attempted murder.
Three years later, a records officer at the Department of Corrections noticed the one-year sentence on count II and labelled it erroneous based on the presence of section 664. The trial court was asked to explain the discrepancy, but apparently could not do so. On June 26, 1984, the count II term was accordingly increased to two years. Following that increase, Ditsch filed the petition now before us. He contends: (1) the trial court erred in selecting the upper term on count I as a base term during resentencing; (2) the trial court erred in increasing the count II term to two years; and (3) the trial court erred in imposing a section 12022.7 enhancement on count II.[3]

DISCUSSION

I
(1) Ditsch first contends the trial court erred in selecting the upper term on count I as a base term during resentencing. He insists imposition of the *582 midterm at the original sentencing prohibited the trial court's action. We disagree.
With respect to the selection of the murder count as the base term, the trial court was required to so act because it carried a greater penalty than a section 217 violation. (See § 1170.1, subd. (a).) With respect to the selection of an upper term as opposed to a midterm, we note that on remand a "trial court is entitled to reconsider its entire sentencing scheme." (People v. Burns (1984) 158 Cal. App.3d 1178, 1184 [205 Cal. Rptr. 356].) It may not, however, sentence a defendant to a greater term than originally imposed. (People v. Savala (1983) 147 Cal. App.3d 63, 69-70 [195 Cal. Rptr. 193].) Because Ditsch received, in this instance, a shorter term on resentencing we discern no error.

II
(2) Ditsch next contends the trial court erred in increasing his sentence on count II from one to two years. Respondent urges that we find the increase valid on the ground that section 664 is now the appropriate sentencing statute. (See People v. Collie (1981) 30 Cal.3d 43, 62-63 [177 Cal. Rptr. 458, 634 P.2d 534, 23 A.L.R.4th 776].) We reject respondent's position for the following reasons.
While it is true that Ditsch's actions currently constitute a violation of section 664, this court properly found that his conduct violated section 217 in 1980. (See People v. Montano (1979) 96 Cal. App.3d 221, 228-233 [158 Cal. Rptr. 47], superseded by statute, Stats. 1980, ch. 300, eff. Jan. 1, 1981.) The opinion ordering that Ditsch be resentenced pursuant to the latter statute accordingly became the "law of the case." Stated more precisely, it became determinative of the rights of the same parties in any subsequent proceeding in the same case. (People v. Scott (1976) 16 Cal.3d 242, 246 [128 Cal. Rptr. 39, 546 P.2d 327].)
A subsequent proceeding has specifically been construed to constitute the same case when that proceeding takes the form of a retrial or appeal. (Ryan v. Mike-Ron Corp. (1968) 259 Cal. App.2d 91, 96 [66 Cal. Rptr. 224].) California courts have not to our knowledge, however, determined the status of a habeas petition in this context. Based on our own examination of the issue, we conclude its proper resolution depends upon the nature of the particular habeas petition filed. Where, as here, the petition amounts to a direct attack on the sentence imposed, common sense dictates that it be characterized as a subsequent proceeding in the same case. In contrast, where the petition amounts to a collateral attack on the judgment of conviction, it is most appropriately characterized as a different case. Technically, *583 of course, the separate case number assigned to all habeas petitions render even those designed as direct attacks separate and distinct from the original action. Were we to adopt such a position, however, form would be unjustifiably elevated over substance.
Having established that the "law of the case" doctrine applies in this instance, it is clear that the trial court erred in increasing Ditsch's term. Pursuant to section 217, a sentence no greater than one year was appropriate on count II.

III
Ditsch finally contends the trial court erred in imposing a section 12022.7 enhancement on count II. Respondent concedes and we agree that this enhancement should be stricken under the principles enunciated in People v. Harvey (1979) 25 Cal.3d 754, 759-761 [159 Cal. Rptr. 696, 602 P.2d 396].)

DISPOSITION
The urgency of this petition requires that the hearing calendared for January 8, 1985, be vacated and the writ issued forthwith.
IT IS ORDERED that the petition be and is hereby granted in the following particulars:
The Riverside Superior Court is directed to reduce the sentence imposed in action No. CR-15584 from 12 to 10 years by making the following corrections and modifications: (1) section 217 should be designated the sentencing statute on count II; (2) the count II term should be reduced to one year; and (3) the section 12022.7 enhancement imposed on count II should be stricken.
An amended abstract of judgment reflecting these corrections and modifications shall thereafter issue.
IT IS FURTHER ORDERED that the Executive Director of the Department of Corrections and the Superintendent of the California Correctional Institution at Tehachapi, California, modify John David Ditsch's term of imprisonment from 12 years to 10 years and recalculate his release date based on the modified sentence.
*584 Except as hereinabove specifically granted, the petition for writ of habeas corpus is denied.
Morris, P.J., and Kaufman, J., concurred.
NOTES
[1]  Unless otherwise indicated, all section references in this opinion are to the Penal Code.
[2]  At all times relevant, a violation of section 217 was punishable by two, three, or four years in state prison. A violation of section 664 was punishable by a five-, six-, or seven-year prison term.
[3]  Because Ditsch did not challenge his resentencing on direct appeal, he is technically precluded from raising these issues in a habeas corpus proceeding. (In re Ronald E. (1977) 19 Cal.3d 315, 321-322 [137 Cal. Rptr. 781, 562 P.2d 684].) Recognizing, however, that "technicalities should be liberally viewed when urged against a defendant in a criminal case," we have chosen to address each issue raised on its merits. (People v. Bob (1946) 29 Cal.2d 321, 325-326 [175 P.2d 12], quoting 8 Cal.Jur., Criminal Law, § 517, p. 503.)
