#### RESTORATION RISK RETENTION GROUP, INC., Plaintiff-Appellant, v. Laura GUTIERREZ, Secretary, Wisconsin Department of Safety and Professional Services, et al., Defendants-Appellees.

No. 17-1016

United States Court of Appeals, Seventh Circuit.

Argued September 14, 2017

Decided January 12, 2018

*341Kevin M. Blair, Kenneth T. Brooks, Afc-•torneys, Honigman Miller Schwartz & Cohn LLP, Lansing, MI, for Plaintiff-Appellant.

Luke N. Berg, Deputy Solicitor General, Ryan J. Walsh, Attorney, Office of the Solicitor General, Wisconsin Department of Justice, Madison, WI, for Defendants-Appellees.

Bonnie Hochman Rothell, Attorney, Morris, Manning & Martin, LLP, Washington, DC, for Amicus Curiae.

Before WOOD, Chief Judge, and RIPPLE and HAMILTON, Circuit Judges.

RIPPLE, Circuit Judge.

Restoration Risk Retention Group, Inc. (“Restoration Risk”) brought this action seeking injunctive and declaratory relief against the Secretary of the Wisconsin Department of Safety and Professional Services (“WDSPS”), and the Trades Credentialing Unit (“TCU”) of the WDSPS. Restoration Risk claims that TCU’s new interpretation of a Wisconsin statute is in*342correct or, in the alternative, that the Liability Risk Retention .Act (“LRRA”),- 15 U.S.C. §§ 3901-3906, preempts the statute as interpreted by TCU.

The district court denied Restoration Risk’s motions for a preliminary injunction and for partial summary judgment. It granted the defendants’ motion for partial judgment on the pleadings. In doing so, the district court agreed with TCU’s new interpretation of the Wisconsin statute, which effectively barred Restoration Risk from operating in Wisconsin. It also concluded that TCU’s interpretation was not preempted by the LRRA.

After the parties stipulated to a voluntary dismissal without prejudice of all remaining claims, the district court entered a final judgment in favor of the defendants. Restoration Risk timely filed this appeal.

For the reasons set forth in this opinion, we vacate the district court’s judgment and remand the case so that the district court can determine whether intervening amendments to the Wisconsin statute render this litigation moot.

I

BACKGROUND

A.

We begin our analysis with a description of risk retention groups (“RRGs”) and of the federal statutory scheme at issue in this case.

A risk retention group is a form of insurance company; the hallmark of such an entity is that it insures only its owners, sometimes referred to as shareholders or members. *See All. of Nonprofits for Ins., Risk Retention Grp. v. Kipper,*712 F.3d 1316, 1319 n.1 (9th Cir, 2013).1 Risk retention groups grew in popularity because, with the increase in product liability litigation, some manufacturers struggled to find affordable product liability insurance. *Ophthalmic Mut. Ins. Co. v. Musser,*143 F.3d 1062, 1064 (7th Cir. 1998). Indeed, some manufacturers had to choose between “unpalatable” insurance options (such as premiums that amounted to “as much as six percent of gross sales” or rates that rose “twenty-five fold in a single year”) or shutting their doors. *Home Warranty Corp. v. Caldwell,*777 F.2d 1455, 1463 (11th Cir. 1985).

To address this situation, Congress enacted the Products Liability Risk Retention Act (“PLRRA”) to encourage and permit “manufacturers to pool their resources into risk retention groups to provide those members of the group with insurance coverage.” *Musser,*143 F.3d at 1064. Because insurance regulation traditionally is left to the states, the PLRRA explicitly preempted state laws that inhibited the formation of risk retention groups. Congress later *343expanded the PLRRA by enacting the Liability Risk Retention Act (“LRRA”).

Under this statutory scheme, Congress sought to protect the establishment of risk retention groups, to subject them primarily to the regulatory requirements of their state of incorporation, and to' limit the ability of other states to impose other unnecessarily burdensome regulations upon them. *See generally Wadsworth v. Allied Prof'ls Ins. Co.,*748 F.3d 100, 103 (2d Cir. 2014). Congress sought to achieve these goals by taking the following steps.

First, the statute preempts “any State law, rule, regulation, or order to the extent that such law, rule, regulation or order would ... make unlawful, or regulate, directly or indirectly, the operation of a risk retention group.” 15 U.S.C. § 3902(a). We refer to this clause as the “preemption clause.”

Second, having exempted, in a general way, risk retention groups from state regulation, the statute then restores state regulation in a manner calibrated to ensure the effectiveness of these groups. The statute provides that a risk retention group’s domiciliary, or chartering, state is the only state allowed to regulate its formation and operation. *Musser,*143 F.3d at 1064, The risk retention group must be “subject to that state’s insurance regulatory laws, including adequate rules arid regulations allowing for complete financial examination of all books and records, including but not limited to proof of solvency.” *Id.*At that point, the risk retention group may operate in any state. *Id.*

Third, the statute recognized that other states had important, but limited, interests in imposing *some*regulation on risk retention groups operating within their borders. The statute accomplishes this goal by reserving certain regulatory powers for non-chartering states by “saving” them from the general preemption clause and giving nonchartering states concurrent authority with chartering states for certain areas of regulation. *See*15 U.S.C. § 3905. Relevant to Restoration Risk’s claims, the LRRA saves from preemption nonchartering state laws that require risk retention groups “to ... demonstrate^] financial responsibility where the State has required a demonstration of financial responsibility as a condition for obtaining a license or permit to undertake specified activities.” 15 U.S.C. § 3905(d). We refer to this as the “financial responsibility savings clause.”

To complicate matters, however, the seemingly finely tuned allocation of authority is subject to an antidiscrimination clause that prohibits states from “otherwise[] discriminating] against a risk retention .group or any of its members,” but does not exempt risk retention groups from any laws that are generally applicable to individuals or corporations. 15 U.S.C. § 3902(a)(4). We refer to this as the “antidiscrimination clause.”

B.

Restoration Risk' is a risk retention group chartered in Vermont. Its shareholder-insureds are businesses that clean and restore buildings after disasters such as floods and fires. In Wisconsin, these businesses are categorized and regulated as “dwelling contractors.” At the time this suit was filed, Wisconsin required dwelling contractors to obtain an annual certificate of financial responsibility from TCU, a requirement they can satisfy with proof of a “policy of general liability insurance issued by an insurer authorized to do business in [Wisconsin].” Wis. Stat. Ann. § 101.654(2)(a) (West 2010).2 Since 2006, dwelling contractors in Wisconsin could meet this state requirement by securing *344general liability insurance from Restoration Risk, which was registered with the Wisconsin Office of the Commissioner of Insurance (“OCI”). This arrangement worked because TCU interpreted “insurer authorized to do business in [Wisconsin]” to include risk retention groups that registered with OCI in Wisconsin and that qualified for federal regulation under the LRRA.3

On April 30, 2015, TCU notified one of Restoration Risk’s shareholder-insureds that its application for dwelling contractor status had been denied because Restoration Risk had “not been authorized to do business in Wisconsin by the Office of Insurance Commissioner.”4 TCU had changed its position and now maintained that an insurer is not “authorized to do business in [Wisconsin]” under the meaning of section 101.654(2)(a) unless it has a Certificate of Authority from OCI.5 Consequently, none of Restoration Risk’s Wisconsin shareholder-insureds could rely on Restoration Risk to satisfy the state liability insurance requirements under section 101.654(2)(a). Restoration Risk contends that requiring its shareholder-insureds to obtain a Certificate of Authority is an impermissible and discriminatory regulation that is preempted by the LRRA. *See*15 U.S.C. § 3902(a)(1). In response, Wisconsin contends that the Certificate of Authority requirement is a financial responsibility requirement that comes within the LRRA’s financial responsibility savings clause and therefore is not preempted. *See*15 U.S.C. § 3905(d).

C.

Restoration Risk brought this action on May 6, 2016, and moved for a preliminary injunction.6 The defendants moved for partial judgment on the pleadings, and Restoration Risk then moved for partial summary judgment on August 12, 2016. The *345district court, in the order before us today, resolved all three of the motions. The district court first held that TCU’s new interpretation of section 101.654(2)(a) is correct and requires dwelling contractors in Wisconsin to be insured by an entity with a Certificate of Authority from OCI. Second, the district court rejected Restoration Risk’s claim that the LRRA preempted the state statute. Notably, the court’s order did not dispose of any of Restoration Risk’s constitutional claims. At the district court’s recommendation, the parties stipulated to the dismissal of those claims without prejudice.7

After the district court decision, Wisconsin amended section 101.654 to give dwelling contractors the option of obtaining insurance either, as was required previously, from an insurer authorized to do business in Wisconsin, *or*from an “insurer that is eligible to provide insurance as a surplus lines insurer in one or more states,” 2017 Wis. Act 16 §§ If, lg. The defendants invited our attention to this amendment through a Rule 28(j) letter. They suggest that the amendment might have mooted the issues in this appeal, but that TCU needs more information from Restoration Risk in order to ascertain whether Restoration Risk qualifies under the new language.8 Restoration Risk declined to provide the defendants with that information; it disagrees that the amendment moots the issues on appeal.9

II

DISCUSSION

A.

Before we turn to the specifics of this case, we must pause to examine the subject matter jurisdiction of the district court as well as our own jurisdiction. We review a district court’s determination that it had subject matter jurisdiction de novo. *Yassan v. J.P. Morgan Chase & Co.,*708 F.3d 963, 967 (7th Cir. 2013). We have an independent obligation to ensure that both the district court and this court have subject matter jurisdiction even when neither the parties nor the district court raised the issue. *Id.*at 967-68.

1.

We turn first to the jurisdiction of the district court. The district court correctly determined that it had subject matter jurisdiction “because the case raises questions of federal law.”10 The district court’s jurisdiction here can be premised on the statute conferring basic federal question jurisdiction on the district courts, 28 U.S.C. § 1331. Several avenues lead us to this conclusion.

a.

First, Restoration Risk’s complaint seeks injunctive and declaratory relief from having to comply with the insurance regulations of Wisconsin on the ground that the federal statutory scheme has preempted those regulations. It is well-established that a party *cannot*proceed on federal question jurisdiction by simply anticipating an affirmative defense of preemption. *See Rice v. Panchal,*65 F.3d 637, 639 (7th Cir. 1995). But it is clear that Restoration Risk is doing something much different. Rather than attempting to *346assert a federal preemption defense, it is simply asserting a federal right to operate ■within Wisconsin free from the restrictions of state regulation, a right that it asserts is grounded in federal law. It seeks an order from the district court requiring state officials to permit it to operate unimpeded from state regulation specifically forbidden by the federal regulatory scheme. Such a claim is premised on a federal right and is fully cognizable in the district court. *Shaw v. Delta Air Lines, Inc.,*463 U.S. 85, 96 n.14, 103 S.Ct. 2890, 77 L.Ed.2d 490 (1983). “[A]s we have long recognized, if an individual claims federal law immunizes him from state regulation, the [federal] court may issue an injunction upon finding the state regulatory actions preempted.” *Armstrong v. Exceptional Child Ctr., Inc.,*— U.S. -, 135 S.Ct. 1378, 1384, 191 L.Ed.2d 471 (2015). The district court’s authority in this respect is'based not on some implied right of action read into the Supremacy Clause, but on Restoration Risk’s “ability to sue to enjoin unconstitutional actions by state and federal officers,” *Id.*This authority “is the creation of courts of equity and reflects a long history of judicial review of illegal executive action, tracing back to England.” *Id.*

The authority of the federal courts to grant such relief, of course, can be .limited by Congress. Indeed, in *Armstrong,*the Supreme Court confirmed the general power of a court of equity to act in such circumstances and concluded that equitable jurisdiction to entertain such an action is “subject to express and implied statutory limitations.” *Id.*at 1385. Specifically, it determined that, in enacting the Medicaid statute, Congress implicitly foreclosed a court’s use of its equity powers to enforce a state’s compliance with Medicaid’s requirements. *Id.*

Here, in contrast to the Medicaid statute, the federal, statutory scheme does not contain, expressly or implicitly, any intent by Congress to limit the traditional equity powers of the federal courts to enjoin state interference with the operation of federal law. Therefore, the impediment that caused the Court to find a lack of federal jurisdiction in *Armstrong*is not present here. Rather, we simply have a complaint asserting that the defendant state officials have 'impeded the ■ right of Restoration Risk to conduct its business under the federal regulatory scheme, which substantially limits state regulatory authority in all but the chartering state. Restoration Risk - seeks relief from this state impediment by the issuance of an injunction. It is well-established that the district court had subject matter jurisdiction to issue such an order if it determined that the substantive merits of the dispute warranted such relief. *See Shaw,*463 U.S. at 96 n.14, 103 S.Ct. 2890.

b.

The federal question jurisdiction of the district court can be premised as well on a wholly independent ground. In its operative complaint, Restoration Risk also set forth under 42 U.S.C. § 1983 substantive and procedural due process claims and an equal protection claim.11 The parties later stipulated to the dismissal of these claims. Despite their later dismissal, the constitutional claims can still be a premise for federal question jurisdiction unless one of two circumstances is present: the federal claims were frivolous at the time they were filed and therefore did not engage the jurisdiction of the district court, *or*the claims were “immaterial and made solely for the purpose of obtaining jurisdiction.” *Bell v. Hood,*327 U.S. 678, 682-83, 66 S.Ct. 773, 90 L.Ed. 939 (1946); *347*see also Steel Co. v. Citizens for a Better Env’t,*523 U.S. 83, 89, 118 S.Ct. 1003, 140 L.Ed.2d 210 (1998).

The first of these circumstances is present only when the federal claim is “‘wholly,’ ‘obviously,’ or ‘plainly’ insubstantial or frivolous ... ‘absolutely devoid of merit’ or ‘no longer open to discussion.’” *Ricketts v. Midwest Nat’l Bank,*874 F.2d 1177, 1182 (7th Cir. 1989) (quoting *Hagans v. Lavine,*415 U.S. 528, 536-39, 94 S.Ct. 1372, 39 L.Ed.2d 577 (1974)). The standard for dismissing a claim under this “substantiality doctrine,” and thus finding that it cannot serve as the basis of federal question jurisdiction, is “a rigorous one.” *Id.*(citing 13B Charles Alan Wright, Arthur R. Miller *&*Edward H. Cooper, *Federal Practice & Procedure, Jurisdiction*§ 3564 (2d ed. 1984)). We are not deprived of jurisdiction so long as “there is any foundation of plausibility to the federal claim.” *Id.*(quoting Wright, Miller & Cooper § 3564). “A claim is insubstantial- only if ‘its unsoundness' so clearly results from the previous decisions of this court as to foreclose the subject and leave no room for the inference that the questions sought to be raised can be the subject of controversy.’ ” *Roppo v. Travelers Commercial Ins. Co.,*869 F.3d 568, 587 (7th Cir. 2017) (quoting *Hagans,*415 U.S. at 538, 94 S.Ct. 1372).

To determine whether Restoration Risk’s constitutional claims fail the “sub-stantiality” test, we must examine whether the allegations in Restoration Risk’s complaint are completely foreclosed by precedent. *See id.*Restoration Risk has alleged that TCU lacked a rational basis or legitimate state interest for its “preferential treatment of traditional commercial insurers who are otherwise licensed and have authority to do business in Wisconsin.”12 As a commercial and economic regulation, section 101.654 is subject to rational basis review. *See Armour v. City of Indianapolis,*566 U.S. 673, 681, 132 S.Ct. 2073, 182 L.Ed.2d 998 (2012). There is at least some room for debate about whether Wisconsin’s decision to treat non-Wisconsin-licensed risk retention groups differently from Wisconsin-licensed risk retention groups is rationally related to a legitimate state interest. *See Metro. Life Ins. Co. v. Ward,*470 U.S. 869, 882-83, 105 S.Ct. 1676, 84 L.Ed.2d 751 (1985) (finding that tax preference for domestic insurance companies violated Equal Protection Clause). Our precedent has not “settlfed]- the matter one way or the other,” *Hagans,*415 U.S. at 539, 94 S.Ct. 1372; thus, regardless of how a federal court eventually would have resolved Restoration Risk’s constitutional claims, they are not so frivolous as to deprive us of subject matter jurisdiction over them.

The .second situation in which a federal claim will not engage the federal question jurisdiction of the district court is when the federal claim is immaterial and brought solely, for purposes of- engaging the district court’s jurisdiction. As the record comes to us from the district court, we cannot say that such a motive .was operative here.

In conclusion, the district court had subject matter jurisdiction because Restoration Risk was suing to enjoin state officials’ allegedly unconstitutional enforcement of state law and because it raised nonfrivo-lous due process- and equal protection claims.

2.

Our appellate jurisdiction is more straightforward. The district court adjudicated fully count one of the operative com*348plaint, determining that the defendant’s interpretation of the statutory language was correct and that the statute, as interpreted, was not preempted by the federal statutory scheme. The court then certified, under Federal Rule of Civil Procedure 54(b), that there was no reasonable cause for a delay in the appeal of that decision. We therefore have jurisdiction of this appeal under 28 U.S.C. § 1291.13

B.

The next question that we must confront is whether the recent amendment to section 101.654(2)(a) requires that we remand this matter to the district court for a determination as to whether the enactment of this amendment renders this litigation moot.

On August 7, 2017, the defendants filed a Rule 28(j) letter inviting our attention to the recent amendment to section 101.654. This amendment gives dwelling contractors an additional option for obtaining the required insurance coverage. A dwelling contractor now can obtain a certificate of financial responsibility by submitting proof of a general liability insurance policy issued by either an “insurer authorized to do business in [Wisconsin]” or an *“insurer that is eligible to “provide insurance as a surplus lines insurer in one or more states.”*Wis. Stat. Ann. § 101.654(2)(a) (West Supp. 2017) (emphasis added). In the defendants’ view, this amendment permits Restoration Risk to qualify to provide coverage to dwelling contractors if it submits proof that it “(1) is ‘domiciled in a United States jurisdiction,’ (2) is ‘authorized to write the type of insurance’ ‘[i]n its domiciliary jurisdiction,’ (3) maintains certain ‘minimum capital and surplus requirements,’ and (4) provides its annual financial-statement.”14 The defendants submit that if Restoration Risk qualifies under the new statute, this appeal is moot, because Restoration Risk’s shareholder-insureds will be able to rely on Restoration Risk for their required insurance coverage. The defendants further note, however, that they lack sufficient information to ascertain whether Restoration Risk qualifies under the amended statute. According to the defendants’ Rule 28(j) letter, either Restoration Risk or its shareholders can submit the needed information to TCU. Neither has done so. The defendants apparently asked Restoration Risk to submit the required information before the defendants submitted their Rule 28(j) letter. Restoration Risk declined to provide the information.15

Albeit laconically, Restoration Risk submits in its reply Rule 28(j) letter that the statutory amendment does not moot the dispute because the disputed language, “authorized to do business in [Wisconsin],” still appears in the statute.16 According to Restoration Risk, under the federal statutory scheme, it need not prove that it can operate in one or more states as a surplus lines insurer in order to do business in Wisconsin. Restoration Risk appears to be concerned that even under the amended statute,. TCU might still impose requirements that are preempted by the LRRA.

*349The import of the statutory amendment to this litigation is a matter that ought to be determined in the first instance by the district court. We cannot know whether section 101.654 is preempted by the LRRA without a full understanding of how the amended statute affects Restoration Risk’s operations in Wisconsin. We believe it would be salutary for the district court to determine the operation and effect of the amended statute and whether it can fairly be characterized as a legitimate effort to require a showing of financial responsibility under the financial responsibility savings clause. It would also be appropriate for the district court to assess more fully the comparative burden imposed on Restoration Risk by the amended statute as compared to the prior version, and to develop a more comprehensive understanding of Wisconsin’s pre-2015 interpretation of the statute, which apparently was acceptable to Restoration Risk. Finally, on the basis of that factual development, the district court should determine whether the case is moot.

Conclusion

Accordingly, we vacate the district court’s judgment and remand this matter to the district court for further consideration. The parties will bear their own costs in this court.

VACATED and REMANDED

1

. Specifically, a risk retention group ("RRG”) "is a group of similar businesses with similar risk exposures, -such as educational institutions or building contractors, which create their own insurance company to self-insure their risks on a group basis,” U.S. Gov’t Accountability Office, GAO-05-536, Risk Retention Groups: Common Regulatory- Standards and Greater Member Protections Are Needed 1 (2005). A risk retention group provides its shareholder-insureds with commercial liability insurance, as opposed to commercial property insurance. *See id.*at 8 n.8; *see also*15 U.S.C. § 3901(a)(2) (defining “liability”). Risk retention groups can offer liability insurance at reduced rates because their shareholder-insureds have the ability to set their own rates "more closely tied to their own claims experience.” U.S. Gov’t Accountability Office, GAO-05-536, at 8. ' Additionally, risk retention groups are thought to encourage shareholder-insureds to practice strong risk-management policies, because in the event that a risk retention group iS unable to pay claims, its shareholder-insureds have their own business assets at stake. *Id.*

2

. Wisconsin Statutes section 101.654 is titled "Contractor certification; education” and is *344in a subchapter of the Wisconsin Code titled "Family Dwelling Code.” It does not use or define the term "dwelling contractor,” but the parties are in agreement that the term is commonly used to refer to contractors certified under section 101.654. We have chosen to use the term in this opinion in accordance with the parties’ practice.

3

.Apparently, OCI employed this interpretation until at least May 20, 2015, even though TCU already had notified Restoration Risk that it was not in compliance with the statute. The record contains an email from Dan Schroeder, a Financial Examiner from OCI, assuring Restoration Risk that it was authorized to provide insurance in Wisconsin:

Restoration RRG is under jurisdiction of the federal Liability Risk Retention Act of 1986 (LRRA), which means that the state of Wisconsin does not have the authority to regulate them. These companies operate under a different set of standards than a typical Wisconsin-licensed insurer. However, the company did submit all required materials to be acknowledged by our state and, under the LRRA, this gives them authority to write business in Wisconsin. R.3-3.

4

. R.3-2.

5

. R. 3 3 at 4. As the district court noted, the parties were not clear about what it means to have a Certificate of Authority from OCI. The district court inferred "that it would require an insurer to submit, at least in part, to Wisconsin’s insurance regulations.” *Id.*

6

. Specifically, Restoration Risk brought claims for declaratory and injunctive relief. It alleged that TCU’s interpretation of section 101.654(2)(a) was preempted by the LRRA and violated Restoration Risk’s Fourteenth Amendment equal protection, procedural due process, and substantive due process rights. Its equal protection claim was based on a claim that section 101.654 discriminates against out-of-state risk retention groups as a class. Its procedural due process claim was based on what Restoration Risk called "TCU's arbitrary denial” of the certification it needed to operate in Wisconsin. R.1 at 17, ¶ 67. Finally, Restoration Risk claimed that section 101.654 violates a liberty interest in providing insurance coverage without a "legitimate state interest.” *Id.*¶¶ 69, 71.

7

.In its order, the district court recommended only that "the parties ... stipulate to dismissal of the constitutional claims.” R.33 at 13. The parties' stipulation was that the claims be dismissed without prejudice. R.34.

8

. App. R.30 at 1-2.

9

. App. R.31.

10

. R.33 at 4.

11

. R.1 at 15-18.

12

. R.1 at 16, ¶ 63; *see also id.*at 17, ¶ 71.

13

.In reply to our pre-argument jurisdiction order, the parties agreed that, if necessary to secure our jurisdiction, they would stipulate to the dismissal with.prejudice of the constitutional claims brought on counts two, three, and four of the complaint. Because the district court certified its decision on count one in accordance with Rule 54(b) of the Federal Rules of Civil Procedure, such a stipulation is unnecessary. Therefore, these counts remain in the case.

14

. App. R.30 at 1 (alteration in original) (citation omitted).

15

. *Id.*at 2.

16

.App. R.31atl.