                FOR PUBLICATION

  UNITED STATES COURT OF APPEALS
       FOR THE NINTH CIRCUIT


DONALD G. STACY,                           No. 13-36025
            Plaintiff-Appellant,
                                              D.C. No.
               v.                        3:11-cv-00655-AC

CAROLYN W. COLVIN,
Commissioner of Social Security             OPINION
Administration,
             Defendant-Appellee.


      Appeal from the United States District Court
               for the District of Oregon
        Anna Brown, District Judge, Presiding

          Argued and Submitted May 6, 2016
                  Portland, Oregon

                    Filed June 7, 2016

   Before: A. Wallace Tashima, Richard C. Tallman,
       and Andrew D. Hurwitz, Circuit Judges.

              Opinion by Judge Tallman
2                        STACY V. COLVIN

                           SUMMARY*


                          Social Security

    The panel affirmed the district court’s decision affirming
the Commissioner of Social Security’s denial of a claimant’s
application for disability insurance benefits under Title II of
the Social Security Act.

    The panel held that the law of the case doctrine and the
rule of mandate apply to social security administrative
remands from federal court in the same way they would apply
to any other case. The panel further held that neither doctrine
barred the administrative law judge from reexamining
claimant’s ability to perform his past work at step four of the
sequential evaluation process under the mandate in this case.
The panel also held that the ALJ properly categorized
claimant’s past work, and the ALJ’s step four findings were
supported by substantial evidence because the claimant could
perform his past work as it was generally performed in the
national economy.


                            COUNSEL

James S. Coon (argued), Swanson, Thomas, Coon & Newton,
Portland, Oregon, for Plaintiff-Appellant.

Richard A. Morris (argued), Special Assistant United States
Attorney; David Morado, Regional Chief Counsel; Social

  *
    This summary constitutes no part of the opinion of the court. It has
been prepared by court staff for the convenience of the reader.
                      STACY V. COLVIN                         3

Security Administration Office of General Counsel, Seattle,
Washington; S. Amanda Marshall, United States Attorney;
Kelly A. Zusman, Assistant United States Attorney, Appellate
Chief; United States Attorney’s Office, Portland, Oregon; for
Defendant-Appellee.


                          OPINION

TALLMAN, Circuit Judge:

     Donald Stacy appeals the denial of his social security
benefits, contending that the ALJ violated the law of the case
doctrine and the rule of mandate by revisiting his ability to do
his past work on remand. Stacy also argues the ALJ erred by
characterizing his past work according to the least demanding
aspect of his former job (as a stationary engineer supervisor).
We have jurisdiction under 28 U.S.C. § 1291, and hold in this
case of first impression that the law of the case doctrine and
the rule of mandate apply to social security administrative
remands from federal court in the same way they would apply
to any other case. But, in this case, we hold no violation of
either doctrine occurred. We also hold that the ALJ properly
categorized Stacy’s past work and correctly found that he was
still able to perform that work as it is generally performed in
the national economy. We therefore affirm the judgment of
the district court.

                               I

    Stacy originally filed for social security benefits in July
2001. Since then, his case has been reviewed by two
different administrative law judges, a magistrate judge, and
two district judges. Stacy claims that his fatigue, gout, chest
4                     STACY V. COLVIN

pains, heart, and vision problems rendered him disabled as of
June 30, 1994. Prior to that date, Stacy worked for seventeen
years as a stationary engineer for the Oregon Department of
Corrections, supervising other engineers operating the boiler
room of the Oregon State Penitentiary in Salem.

     Stacy’s application has gone through a seemingly endless
cycle of appeals and remands. After Stacy’s application for
benefits was denied initially and upon reconsideration, his
first hearing in front of an ALJ occurred in September 2002.
At that hearing, a Vocational Expert (VE) testified that Stacy
was a “working supervisor” who performed heavy work, and
therefore he could not perform his past relevant work as a
“stationary engineer.” The VE went on to testify that Stacy
could perform medium work, including that of a dispatcher of
maintenance services and supervisor of janitorial services.
The ALJ agreed with the VE and found Stacy not disabled at
step 5 because he retained the capacity to do other work in the
national economy. The Appeals Council denied review, and
Stacy sought relief in federal court.

   By stipulation of the parties, the case was remanded.
Magistrate Judge John Jelderks issued the following remand
order which reopened the record:

       The ALJ will recontact Plaintiff’s treating
       physicians regarding his visual acuity for the
       period at issue, and will further evaluate
       Plaintiff’s subjective complaints. The ALJ
       will obtain additional evidence from medical
       and vocational experts, as needed. The ALJ
       will further evaluate and document Plaintiff’s
       work activity after the alleged onset date. The
       ALJ will take any other actions necessary to
                      STACY V. COLVIN                        5

       develop the record and issue a new decision.
       Plaintiff will be afforded the opportunity to
       submit additional evidence and argument.

    On remand, a second hearing was held in front of the
same ALJ. No VE testified. After the hearing, the ALJ again
denied benefits, and Stacy again appealed. District Judge
Michael Mosman reversed, holding that the ALJ omitted
certain lifting restrictions from Stacy’s Residual Functional
Capacity (RFC) determination, and that the VE’s testimony
conflicted with information in the Dictionary of Occupational
Titles (DOT). Judge Mosman remanded the case for the
second time with instructions to “formulate a correct RFC,
further evaluate step five of the disability analysis, and
otherwise comply with [Judge Jelderks’s] remand order.”

    On remand, a different ALJ held a third evidentiary
hearing where Stacy and a new VE testified. Stacy testified
that “probably 70 to 75 percent” of his work at the
Department of Corrections “was supervisory.” The ALJ
seemed surprised by this information, noting “my estimation
of how quickly this can be resolved has just changed based on
the Claimant’s testimony about his supervisory functions.”
Based on this new evidence, the ALJ asked the VE if Stacy
could perform his past relevant work. The VE replied: “As
he performed the stationary engineer, no. As a stationary
engineer supervisor, yes.” The ALJ then denied Stacy
benefits at step 4, holding that Stacy could perform his past
relevant work of “stationary engineer supervisor” as that job
is generally performed in the national economy.

   Stacy again appealed. The case was assigned to District
Judge Anna Brown who held that the ALJ’s step 4 finding
was correct and found that neither the law of the case doctrine
6                     STACY V. COLVIN

nor the rule of mandate were violated. The denial of benefits
was affirmed. This timely third appeal followed.

                               II

    Stacy first argues that the ALJ violated both the law of the
case doctrine and the rule of mandate in the third
administrative hearing by reevaluating his ability to do his
past relevant work. We disagree. As a matter of first
impression, we hold that both the law of the case doctrine and
the rule of mandate apply in the social security context. But
we also hold that neither was violated in this case. We
discuss each principle in turn.

                               A

    The law of the case doctrine generally prohibits a court
from considering an issue that has already been decided by
that same court or a higher court in the same case. Hall v.
City of Los Angeles, 697 F.3d 1059, 1067 (9th Cir. 2012).
The doctrine is concerned primarily with efficiency, and
should not be applied when the evidence on remand is
substantially different, when the controlling law has changed,
or when applying the doctrine would be unjust. See Merritt
v. Mackey, 932 F.2d 1317, 1320 (9th Cir. 1991). A district
court’s discretionary decision to apply the law of the case
doctrine is reviewed for abuse of discretion. Hall, 697 F.3d
at 1067.

    Here, there were two prior step 4 findings by ALJs that
Stacy could not perform his past work. Although these
findings were never affirmed by the district court on review,
this is typically the type of determination that should not be
reconsidered under the law of the case doctrine.
                           STACY V. COLVIN                                  7

    But this is not the typical case. On remand, the second
ALJ was surprised to hear new evidence that Stacy mostly
performed supervisory tasks in his past job. This new
testimony led a VE to conclude, for the first time, that Stacy
could still perform the job of stationary engineer supervisor
as that job is generally performed. The ALJ properly
considered this new, highly probative testimony about Stacy’s
ability to perform his past work and made a new finding
supported by that testimony. Given the new evidence on
remand, the district court did not abuse its discretion in
declining to apply the law of the case doctrine.

                                     B

    “The rule of mandate is similar to, but broader than, the
law of the case doctrine.” United States v. Cote, 51 F.3d 178,
181 (9th Cir. 1995). The rule provides that any “district court
that has received the mandate of an appellate court cannot
vary or examine that mandate for any purpose other than
executing it.”1 Hall, 697 F.3d at 1067. The district court
may, however, “decide anything not foreclosed by the
mandate.” Id. But the district court commits “jurisdictional
error” if it takes actions that contradict the mandate. See id.
Whether an ALJ has obeyed the remand order of an appellate
court is a question of law that we review de novo. See
Sullivan v. Hudson, 490 U.S. 877, 886 (1989).



  1
    We decline the Commissioner’s invitation to fashion a special, more
flexible rule of mandate doctrine specially tailored to social security cases.
Because we find the traditional doctrine is flexible enough to
accommodate the Commissioner’s concerns while still preserving the
integrity of the mandate, we apply traditional rule of mandate principles
in this case as we would in any other case.
8                     STACY V. COLVIN

    We have previously allowed district courts to reexamine
any issue on remand that is not inconsistent with the mandate.
See Odima v. Westin Tucson Hotel, 53 F.3d 1484, 1497 (9th
Cir. 1995). To illustrate, in Odima we remanded with
instructions to make specific findings concerning an
employer’s reasons for not promoting the plaintiff. Id. On
remand, the district court did as we directed but also
reevaluated and expanded upon the remedies available to the
plaintiff. Id. We held the district court was free to revisit the
issue of remedies on remand because “any issue not expressly
or impliedly disposed of on appeal [is] available for
consideration by the trial court on remand.” Id. (quoting
Firth v. United States, 554 F.2d 990, 993–94 (9th Cir. 1977)).

    Given the expansive remand orders in this case, the ALJ
did not violate the rule of mandate. Judge Mosman’s remand
order did not preclude the ALJ from taking new evidence
relevant to the step 4 determination. While that order focused
on step 5 of the process, it also held that the ALJ used an
incorrect RFC, a determination that is made before reaching
step 4 and which significantly affects the analysis at steps 4
and 5. See Evaluation of Disability in General, 20 C.F.R.
§ 404.1520(e)–(f) (2012). A correct RFC is necessary to
understand the claimant’s ability to function in the workplace
and therefore his ability to return to past work. Id. By asking
the ALJ to correct Stacy’s RFC, Judge Mosman also
impliedly instructed the ALJ to reconsider step 4 and
determine whether someone with that corrected RFC could
perform Stacy’s past work.

    Moreover, Judge Mosman’s order incorporated Judge
Jelderks’s prior remand order. Judge Jelderks’s order
essentially remanded on an open record, directing the ALJ to
start again at step 1 and “document Plaintiff’s work activity
                      STACY V. COLVIN                        9

after the alleged onset date.” That order also instructed the
ALJ to “obtain additional evidence from . . . vocational
experts, as needed.” Although Judge Jelderks’s order did not
expressly authorize the ALJ to reinvestigate step 4, it did
direct the ALJ to “take any other actions necessary to develop
the record and issue a new decision.”

    Stacy argues that Judge Mosman’s order was violated
because it directed the ALJ to “further evaluate step five of
the disability analysis,” yet the ALJ did not reach step 5 on
remand. We reject this argument because the remand order
must be read holistically. Looking at the full text of Judge
Mosman’s order, combined with the court’s opinion, it is
clear that the mandate was not intended to restrict the ALJ to
only engage in the step 5 analysis. Because Judge Mosman
also ordered the ALJ to “formulate a correct RFC” and to
“otherwise comply with [Judge Jelderks’s] remand order,” the
ALJ would have violated the mandate by performing only a
step 5 analysis.

     The ALJ at the third hearing properly began by taking
testimony. Because the ALJ was told to formulate a correct
RFC, it was logical to ask Stacy to describe his past work,
and she was surprised to learn that it was mostly supervisory.
At that point she did something that the mandate neither
required nor prevented her from doing—she revisited the
categorization of Stacy’s former job and his ability to perform
it as it is performed in the national economy. The ALJ did
not exceed her authority under Judge Mosman’s broad
remand order by doing so; therefore, the ALJ did not violate
the rule of mandate.
10                    STACY V. COLVIN

                              III

    Stacy next argues that the ALJ erred in classifying his
former work based on the least demanding aspect of the job:
supervising. We disagree. “We may overturn the ALJ’s
decision ‘only if it is not supported by substantial evidence or
if it is based on legal error.’” Carillo-Yeras v. Astrue,
671 F.3d 731, 734 (9th Cir. 2011) (quoting Thomas v.
Barnhart, 278 F.3d 947, 954 (9th Cir. 2002)). The ALJ’s
decision correctly determined Stacy could perform the job of
stationary engineer supervisor as that position is generally
performed in the national economy.

    At step four, a claimant has the burden to prove that he
cannot perform his past relevant work “either as actually
performed or as generally performed in the national
economy.” Lewis v. Barnhart, 281 F.3d 1081, 1083 (9th Cir.
2002). ALJs may use either the “actually performed test” or
the “generally performed test” when evaluating a claimant’s
ability to perform past work. SSR 82-61, 1982 WL 31387
(1982). Social security rulings explain how to apply the
“generally performed test”:

       A former job performed in by the claimant
       may have involved functional demands and
       job duties significantly in excess of those
       generally required for the job by other
       employers throughout the national economy.
       Under this test, if the claimant cannot perform
       the excessive functional demands and/or job
       duties actually required in the former job but
       can perform the functional demands and job
       duties as generally required by employers
                     STACY V. COLVIN                       11

       throughout the economy, the claimant should
       be found to be “not disabled.”

Id.

    Thus, the “generally performed test” is designed for
situations where a claimant’s past job was especially
demanding when compared with industry standards. See,
e.g., Jack v. Colvin, No. CV 14-08464 RAO, 2015 WL
5567748 (C.D. Cal. Sept. 22, 2015) (past work was properly
categorized as “athletic director” at a sedentary level of
exertion even though the claimant actually performed the job
at a heavy level of exertion).

    Regardless of which test is applied at step 4, the ALJ may
not classify a past occupation “according to the least
demanding function.” Carmickle v. Comm'r, SSA, 533 F.3d
1155, 1166 (9th Cir. 2008) (quoting Valencia v. Heckler,
751 F.2d 1082, 1086 (9th Cir. 1985)). In Carmickle, only 20
percent of the claimant’s duties as a construction supervisor
involved supervision; the remainder of his time was spent
performing manual labor. Id. We held that the ALJ erred in
categorizing the claimant’s job as “a purely supervisory
position.” Id. Similarly, in Valencia, the ALJ erred in
classifying the claimant’s prior work as a “tomato sorter”
involving only light exertion because the claimant was
actually an “agricultural laborer” who mostly performed
other, medium exertion tasks. Valencia, 751 F.2d at 1086.
And, in Vertigan v. Halter, the ALJ erred by categorizing the
claimant’s past work as a “cashier” when she was actually a
“pharmacy clerk” and cashier work was only “a small part of
her job.” 260 F.3d 1044, 1051 (9th Cir. 2001). In all three
cases “the least demanding aspect” of the claimant’s past job
12                    STACY V. COLVIN

was something the claimant did less than half the time, and
the ALJ erred in equating that one task with a full time job.

     Here, the ALJ’s determination that Stacy could perform
his past work is supported by substantial evidence. All
parties agree that Stacy cannot perform his past work as it
was actually performed. There is substantial evidence,
however, that Stacy can still perform his past work as it is
generally performed in the national economy. Stacy argues
this finding is erroneous because he was a working
supervisor, and the VE testified at the first hearing that “most
all” of the stationary engineer supervisor jobs in Oregon
involve manual labor. Stacy argues that this testimony shows
he cannot perform the job of stationary engineer supervisor
as it is generally performed in Oregon.

    Stacy is wrong on two accounts. First, Stacy misreads the
transcript. The first VE said that most stationary engineer
supervisors working for the State of Oregon are working
supervisors. The VE did not say, as Stacy claims, that most
of the supervisor positions in the state require manual work.
Second, even if Stacy’s interpretation of the transcript was
correct, the relevant test is how the job is typically performed
in the national economy, not how the job is performed in the
state economy.

    Stacy next argues that the ALJ erred in categorizing his
past work according to its least demanding function, citing
Carmickle and Valencia. Stacy agrees, however, that the ALJ
could validly apply the “generally performed” test in this
case. Reconciling the “generally performed” test with the
Valencia line of cases is difficult but not impossible. We
hold that Valencia and its progeny do not apply in cases such
as this one where (1) the “least demanding function” is a task
                      STACY V. COLVIN                       13

that the claimant actually performed most of the time; and
(2) the DOT defines the claimant’s past job as requiring only
that least demanding function.

    In this case, the DOT classifies Stacy’s past job as purely
supervisory and he mostly performed supervisory tasks in that
job. Per the DOT, a Stationary-Engineer Supervisor
“supervises and coordinates the activities of Stationary
Engineer[s].” See U.S. Dep’t. of Labor, Dictionary of
Occupational Titles at 950.131-014 (4th ed. rev. 1991).
When Stacy performed that job, he engaged in supervisory
duties 70–75 percent of the time. The fact that his employer
also required him to occasionally do other, non-supervisory
tasks does not change the fundamental nature of his work.
This case is therefore distinguishable from Carmickle,
Valencia, and Vertigan, where the claimants performed less-
demanding tasks only occasionally. Here, Stacy spent the
vast majority of his time supervising. We therefore hold that
the ALJ did not categorize Stacy’s past work according to its
least demanding function but instead correctly applied the
“generally performed” test.

                              IV

    We affirm the judgment of the district court. In doing so,
we hold that the law of the case doctrine and the rule of
mandate apply with equal force in social security cases, but
that neither doctrine barred the ALJ from reexamining
Stacy’s ability to perform his past work at step 4 under the
mandate in this case. We also hold that the ALJ’s step 4
findings are supported by substantial evidence because Stacy
can perform his past work as it is generally performed in the
national economy.
14                    STACY V. COLVIN

     Each party shall bear its own costs on appeal.

     AFFIRMED.
