                 FOR PUBLICATION
 UNITED STATES COURT OF APPEALS
      FOR THE NINTH CIRCUIT

NATIONWIDE MUTUAL INSURANCE           
COMPANY,
               Plaintiff-Appellant,
                                           No. 04-15744
               v.
WILLIAM JOHN LIBERATORE; UNITED             D.C. No.
                                          CV-03-05903-LJO
STATES OF AMERICA; DOLLAR RENT-
                                             OPINION
A-CAR SYSTEMS, INC.; SHERI LEANN
IVEY,
            Defendants-Appellees.
                                      
       Appeal from the United States District Court
          for the Eastern District of California
     Lawrence J. O’Neill, Magistrate Judge, Presiding

                   Argued and Submitted
         April 13, 2005—San Francisco, California

                    Filed May 12, 2005

     Before: John T. Noonan, David R. Thompson, and
            Pamela Ann Rymer, Circuit Judges.

               Opinion by Judge Thompson




                           5171
5174       NATIONWIDE MUTUAL INSURANCE v. LIBERATORE


                               COUNSEL

Ralph E. Laird, Auburn, California, for the plaintiff-appellant.

Kristi C. Capetan, Assistant United States Attorney, Fresno,
California, for the defendants-appellees.


                               OPINION

THOMPSON, Senior Circuit Judge:

   Nationwide Mutual Insurance Company appeals the district
court’s summary judgment in this insurance coverage dispute
involving the United States government.1 Underlying the cov-
erage dispute is a state tort action arising out of an auto acci-
dent. The defendant driver, William John Liberatore, was
insured by Nationwide, and at the time of the accident was an
active duty member of the armed services of the United
States. Under the terms of the Federal Tort Claims Act
(FTCA), 28 U.S.C. §§ 1346(b), 2671-2680 (2004), because
Liberatore was a federal employee, the federal government




  1
    In the district court, this case was heard and decided by a United States
Magistrate Judge pursuant to 28 U.S.C. § 636(c). In this appeal, we refer
to the decisions made by the Magistrate Judge as decisions by the district
court.
         NATIONWIDE MUTUAL INSURANCE v. LIBERATORE          5175
would have responsibility for indemnifying him if, at the time
of the accident, he were acting within the scope of his
employment. The district court determined that Liberatore
was not acting within the scope of his employment, leaving
Nationwide to indemnify Liberatore for any damages awarded
in the underlying action. We have jurisdiction under 28
U.S.C. § 1291, and we affirm.

                               I

              FACTS AND PROCEEDINGS

   On the morning of July 18, 2001, Liberatore, a Command
Master Chief in the United States Navy, flew from Norfolk,
Virginia to Los Angeles, California. Liberatore was traveling
from his permanent duty station in Norfolk on temporary
additional detached duty (TAD) travel orders which autho-
rized him to travel via Los Angeles to Naval Air Weapons
Station China Lake and Naval Air Weapons Station Point
Mugu, and then to a Command Career Counselor Symposium
in Nashville, Tennessee. According to the officer who autho-
rized the TAD orders, Liberatore’s travel to the bases in Cali-
fornia was intended to achieve two purposes: first, to permit
him to meet with his counterpart at the Pacific Fleet Airborne
Early Warning Wing; and second, to permit him to visit and
to consider accepting orders for his next permanent duty
assignment to either China Lake or Point Mugu.

   Although Liberatore’s travel orders referenced the locations
of his travel, the orders did not impose specific restrictions on
his travel or activities. According to the authorizing officer,
the orders implicitly contemplated that Liberatore would
enjoy periods of liberty (i.e., free time) when he was not
engaged in fulfilling the duties specified in his orders.

   Liberatore understood that he would have some free time
during his trip, and accordingly planned that upon his arrival
in Los Angeles he would drive to Bakersfield, California, to
5176     NATIONWIDE MUTUAL INSURANCE v. LIBERATORE
meet a friend, Sheri Ivey. He intended to drive himself and
Ivey to China Lake the next day, then to return Ivey to her
home in Bakersfield. Thereafter, he planned to visit Point
Mugu, as well as another unspecified base further north, and
finally if time permitted, the Naval Air Station in San Diego.

   According to this plan, upon his arrival in Los Angeles,
Liberatore picked up a rental car from Dollar Rent-A-Car pur-
suant to a prearranged, pre-paid reservation made by his com-
mand. He left the airport and drove to Ivey’s home in
Bakersfield. Ivey was not home when he arrived, so he drove
to a nearby Veterans of Foreign Wars post and drank three
beers while he waited for her to come home. Liberatore then
picked Ivey up, and together they decided to drive to State
Line, Nevada to gamble and to spend the night.

   On the way to State Line, Liberatore bought a twelve-pack
of beer at a convenience store. Both Liberatore and Ivey
drank beer in the car during the trip. They had been driving
for about an hour when they came upon a traffic backup on
the freeway caused by an earlier accident. Liberatore did not
notice that traffic had stopped until it was too late for him to
prevent his car from rear-ending a large truck. Liberatore suf-
fered minor injuries from the accident, but Ivey suffered mul-
tiple, serious injuries. Liberatore was arrested at the scene of
the accident for driving while under the influence, and was
later convicted of that offense. Liberatore did not visit the
military sites he had intended, nor did he inform his superiors
of the accident.

   The accident spawned two related lawsuits: an underlying
civil action filed by Ivey alleging negligence claims against
Liberatore, Dollar, and the United States, Ivey v. United
States, et al., No. CV-F-02-6138 (E.D. Cal. Feb. 5, 2004); and
the declaratory judgment action at issue in this appeal filed by
Nationwide against Liberatore, the United States, Dollar, and
Ivey, Nationwide Mutual Ins. Co. v. Liberatore, et al., No.
CV-F-03-5903 (E.D. Cal. Feb. 5, 2004). The cases were not
         NATIONWIDE MUTUAL INSURANCE v. LIBERATORE         5177
consolidated, but were assigned as related cases to be heard,
with the parties’ consent, by a magistrate judge. See 28 U.S.C.
§ 636(c).

   In the Ivey case, the United States filed a motion for sum-
mary judgment in which the government argued that Libera-
tore was not acting within the scope of his employment at the
time of the accident, and therefore the Federal Tort Claims
Act wavier of sovereign immunity from suit for personal inju-
ries caused by an employee of the United States government
did not apply. In the Nationwide case, the United States filed
a motion to dismiss the complaint for failure to articulate a
basis for federal subject-matter jurisdiction, and Nationwide
filed a motion for summary judgment. Nationwide argued
Liberatore had been acting within the scope of his employ-
ment when the accident occurred and, consequently, Nation-
wide’s insurance coverage did not apply. The parties to both
actions agreed that the scope of employment question was the
central issue in both cases, and therefore agreed to coordi-
nated consideration of the motions for dismissal and for sum-
mary judgment.

   In the Ivey case, the district court granted the government’s
motion for summary judgment and remanded Ivey’s remain-
ing claims, against Dollar and Liberatore, to state court. This
judgment was not appealed. On the same day, by separate
order in the Nationwide case, the district court denied the gov-
ernment’s motion to dismiss for lack of subject-matter juris-
diction and denied Nationwide’s motion for summary
judgment. The court concluded that Liberatore was not acting
“in the line of duty” when the accident occurred and therefore
his negligence could not properly be attributed to the govern-
ment. Judgment was entered against Nationwide, and it
appeals.
5178       NATIONWIDE MUTUAL INSURANCE v. LIBERATORE
                                    II

                            DISCUSSION

  A.    Subject-Matter Jurisdiction

   We begin by addressing the government’s contention that
the district court lacked subject matter jurisdiction because
Nationwide’s complaint inadequately pled federal subject
matter jurisdiction. The existence of subject-matter jurisdic-
tion is a question of law which we review de novo. Principal
Life Ins. Co. v. Robinson, 394 F.3d 665, 669 (9th Cir. 2005).

   [1] In its complaint, Nationwide expressly sought relief
under the Federal Declaratory Judgment Act, 28 U.S.C.
§§ 2201-2202 (2004). Because the Declaratory Judgment Act
does not by itself confer federal subject-matter jurisdiction,
Nationwide was required to plead an independent basis for
federal jurisdiction. It did not. Nevertheless, Nationwide’s
complaint expressly states that resolution of its claims would
require the federal court to apply the Federal Tort Claims Act,
a clear indication that Nationwide’s complaint presented a
federal question giving rise to federal subject-matter jurisdic-
tion. Although Nationwide should have specified the exis-
tence of jurisdiction under 28 U.S.C. § 1331, its failure to do
so in this case amounted to no more than inartful pleading, an
error that “does not in itself constitute an actual defect of fed-
eral jurisdiction.” Jacobs v. Patent Enforcement Fund, Inc.,
230 F.3d 565, 568 n.3 (2d Cir. 2000).2 Because the existence
  2
    Although it is preferable that a district court require formal amendment
of a defective complaint, see 28 U.S.C. § 1653; Snell v. Cleveland, Inc.,
316 F.3d 822, 828 (9th Cir. 2002), formal amendment is not required
when the reviewing court can readily recognize the existence of jurisdic-
tion. Odishelidze v. Aetna Life & Cas. Co., 853 F.2d 21, 25 (1st Cir.
1988). In this case, we agree with the district court that the existence of
federal question jurisdiction was readily discernable from the face of the
complaint, and therefore amendment was not necessary to cure Nation-
wide’s technical pleading defect.
           NATIONWIDE MUTUAL INSURANCE v. LIBERATORE            5179
of federal subject-matter jurisdiction, predicated on federal
question jurisdiction, was clear, the district court did not err
by denying the government’s motion to dismiss.

  B.     Issue Preclusion

   The government also argues that because the identical issue
of Liberatore’s scope of employment was litigated in the Ivey
case (in which Nationwide was not a party), Nationwide is
bound by the decision in the Ivey case that resolved that issue
against the position Nationwide asserts in this case. We reject
this interpretation of our law of issue preclusion.

   [2] We addressed a similar argument in Orion Tire Corp.
v. Goodyear Tire & Rubber Co., 268 F.3d 1133 (9th Cir.
2001). In Orion Tire, the appellee argued that the appeal was
barred by claim preclusion based upon a judgment post-dating
the judgment on appeal. Id. at 1135. We rejected the appel-
lee’s position, noting the fundamental difference between the
preclusive effect of a district court judgment upon a future
action and its effect upon an action that predates the relevant
judgment. Id. at 1135-36. Although a district court judgment
carries preclusive effect going forward, it cannot operate to
bar direct review of an extant judgment. Id. at 1136. To con-
clude otherwise would

       turn[ ] res judicata on its head. The doctrine is
       founded on the principle that “[a] judgment merely
       voidable because based upon an erroneous view of
       the law is not open to collateral attack, but can be
       corrected only by a direct review and not by bringing
       another action upon the same cause.” To permit
       another action upon the same cause to displace the
       direct review of the first judgment would be to invert
       the doctrine’s precepts.

Id. (quoting Federated Dep’t Stores, Inc. v. Moitie, 452 U.S.
394, 398 (1981)).
5180     NATIONWIDE MUTUAL INSURANCE v. LIBERATORE
  [3] The only relevant difference as to the preclusion issue
between this case and Orion Tire is the timing of the two
judgments—here, both judgments were entered on the same
day, while in Orion Tire, the judgment being appealed was
entered before the judgment allegedly precluding the appeal.
But the applicable principle is the same: a decision entered
coincident with the judgment on appeal, just as a judgment
entered after the judgment on appeal, “can scarcely constitute
a bar to the instant action.” Flood v. Harrington, 532 F.2d
1248, 1250 (9th Cir. 1976). We conclude that the scope of
employment issue Nationwide seeks to have us review in this
appeal is not precluded by the district court’s decision resolv-
ing that issue against Nationwide the same day in the Ivey
case.

  C.   Scope of Employment

   We now turn to the question whether Liberatore was acting
within the scope of his employment at the time of the acci-
dent. We review de novo the district court’s ruling on this
issue. Beentjes v. Placer County Air Pollution Control Dist.,
397 F.3d 775, 777 (9th Cir. 2005).

   [4] The Federal Tort Claims Act waives the sovereign
immunity of the United States and provides a cause of action
against the government for persons injured as a result of “the
negligent or wrongful act or omission of any employee of the
Government while acting within the scope of his office or
employment, under the circumstances where the United
States, if a private person, would be liable to the claimant in
accordance with the law of the place where the act or omis-
sion occurred.” 28 U.S.C. § 1346(b)(1). Whether a member of
the armed services of the United States was acting within the
scope of his employment at the time of an alleged negligent
or wrongful act depends on whether the individual was “act-
ing in line of duty.” 28 U.S.C. § 2671. “The scope of employ-
ment inquiry, including, in the military context, whether the
employee was ‘acting in line of duty,’ is defined by the appli-
         NATIONWIDE MUTUAL INSURANCE v. LIBERATORE           5181
cable state law of respondeat superior.” Lutz v. Sec’y of the
Air Force, 944 F.2d 1477, 1488 (9th Cir. 1991). In this case,
because the allegedly negligent act took place in California,
California provides the controlling law. 28 U.S.C. § 1346(b);
Miller v. United States, 945 F.2d 1464, 1466 (9th Cir. 1991).

   [5] Under California’s law of respondeat superior, employ-
ers are liable for acts of their employees occurring within the
scope of their employment. Farmers Ins. Group v. County of
Santa Clara, 906 P.2d 440, 448 (Cal. 1995). The California
Supreme Court has held that an employee is acting within the
scope of his employment

    when in the context of the particular enterprise an
    employee’s conduct is not so unusual or startling that
    it would seem unfair to include the loss resulting
    from it among other costs of the employer’s busi-
    ness. In other words, where the question is one of
    vicarious liability, the inquiry should be whether the
    risk was one that may fairly be regarded as typical
    of or broadly incidental to the enterprise undertaken
    by the employer.

Id. (italics deleted) (internal quotation marks omitted); see
also Lisa M. v. Henry Mayo Newhall Mem’l Hosp., 907 P.2d
358, 362 (Cal. 1995) (noting that the test is not one of “but
for” causation, but rather depends upon whether the risk of
the tortious act was “inherent in the working environment or
typical of or broadly incidental to the enterprise the employer
has undertaken.”).

   [6] This test has been interpreted broadly to include within
the scope of employment an employee’s acts of personal con-
venience during working hours, as well as acts of the
employee that combine personal business with the business of
the employer. Farmers Ins. Group, 906 P.2d at 448. But the
scope of employment inquiry is not boundless. Thus, an
employer will not be held liable for an employee’s conduct “if
5182     NATIONWIDE MUTUAL INSURANCE v. LIBERATORE
the employee substantially deviates from the employment
duties for personal purposes.” Id. at 449 (italics deleted).

   We have previously applied California’s law of respondeat
superior to determine whether the tortious acts of serviceper-
sons occurred within the scope of employment. In these cases
we have primarily examined the objectives being furthered by
the employee’s conduct at the time of the accident.

   In Chapin v. United States, 258 F.2d 465 (9th Cir. 1958),
an Army private was involved in a car accident while travel-
ing between duty stations on permanent change-of-station
travel orders. Id. at 466. We determined that under California
law, the serviceperson had not been acting within the scope
of his employment at the time of the accident because the act
of traveling was not part of the serviceperson’s duties. Id. at
470. We also noted the importance to our conclusion of the
government’s relatively limited degree of control over the ser-
viceperson during the completion of his travel. Id. at 469-470.

   Similarly, in United States v. McRoberts, 409 F.2d 195 (9th
Cir. 1969), we held that a serviceperson was not acting within
the scope of his employment when he was involved in an
accident while on leave incident to authorized travel. We
relied principally on the importance of the employee’s status
at the time of the incident, noting that the employee’s “leave
of absence en route, free of any obligation to his employer,
permitted the inference that the employee was not furthering
his employer’s purposes when the accident occurred.” Id. at
197. (quoting United States v. Romitti, 363 F.2d 662, 665-66
(9th Cir. 1966)).

   In Murphey v. United States, 179 F.2d 743 (9th Cir. 1950),
we concluded that an Air Force sergeant who was specifically
authorized to drive servicepersons in a military vehicle into
town for recreational purposes was acting within the scope of
his employment at the time of an accident involving the vehi-
cle. Id. at 744. In reaching this result, we did not hold “that
          NATIONWIDE MUTUAL INSURANCE v. LIBERATORE           5183
in any case where the soldier is on a frolic of his own he can
make the government liable simply because he there found
entertainment.” Id. at 745-46. Rather, the serviceperson driv-
ing the military vehicle was acting under the specific direction
of, and with the purpose intended by, his employer. See id. at
746.

   [7] Having considered California law, we conclude Libera-
tore was not acting within the scope of his employment by the
government at the time of the accident. Although he was
authorized to enjoy liberty while fulfilling the duties contem-
plated by his travel orders, at the time of the accident Libera-
tore was on a frolic of his own in which he substantially
deviated from the employer’s purposes. That the Navy had no
objection to Liberatore’s use of his free time and the pre-paid
rental car for personal purposes does not render his conduct
in this case within the scope of his governmental employment.

   [8] The courts of California have occasionally asked, as a
supplementary means to determine the inherent risk of an
employee’s conduct, whether an occurrence was a generally
foreseeable consequence of the employee’s activity. See
Farmers Ins. Group, 906 P.2d at 448; Lisa M., 907 P.2d at
362. An employee’s conduct is foreseeable if, “in the context
of the particular enterprise[,] [it] is not so unusual or startling
that it would seem unfair to include the loss resulting from it
among other costs of the employer’s business.” Farmers Ins.
Group, 906 P.2d at 464 (Mosk, J., dissenting) (italics deleted).
Foreseeability in this context is not the same as foreseeability
as a test for negligence, but rather looks specifically to the
employer’s expectations arising out of the particular employ-
ment related activity. See id.

   [9] Review of the circumstances of this case under Califor-
nia’s supplemental foreseeability test bolsters our conclusion
that Liberatore was not acting within the scope of his employ-
ment at the time of the accident. Liberatore’s relevant per-
sonal conduct was not so foreseeable by his employer that his
5184     NATIONWIDE MUTUAL INSURANCE v. LIBERATORE
employer could fairly be held liable for damages resulting
from an accident caused by that conduct.

                              III

                       CONCLUSION

   Nationwide’s complaint was adequate to indicate the exis-
tence of federal subject-matter jurisdiction pursuant to 28
U.S.C. § 1331; thus, the district court had federal subject mat-
ter jurisdiction. Nationwide’s claim in this appeal is not pre-
cluded because a parallel claim was decided on the same day
in the Ivey case against the position Nationwide advocates in
this case. Nationwide’s claim fails, however, on its merits. At
the time of the accident, Liberatore was not acting within the
scope of his employment by the United States government.
Because Liberatore was not acting within the scope of that
employment, the United States is not liable for damages
caused by his alleged negligence.

  AFFIRMED.
