Wal-Mart Puerto Rico, Inc. (“Wal-Mart PR”) brought this suit against the Puerto Rico Secretary of the Treasury to challenge the lawfulness of Puerto Rico’s corporate alternative minimum tax (“AMT”), as amended in May 2015. The district court held that it had jurisdiction over the suit and enjoined the enforcement of the AMT after concluding that the AMT violates the dormant Commerce Clause; the Federal Relations Act, 48 U.S.C. § 741a; and the Equal Protection Clause. Wal-Mart P.R., Inc. v. Zaragoza-Gómez, No. 3:15-CV-03018,174 F.Supp.3d 585, 652-53, 2016 WL 1183091, at *51 (D.P.R. Mar. 28, 2016).
We affirm, which continues the injunction against enforcement of the AMT against Wal-Mart PR. The federal district court did have jurisdiction because Wal-Mart PR, at the time of suit, lacked a plain, speedy, and efficient remedy in the Puerto Rico courts due to changes in legislation and regulation. As applied to these facts, those changes imposed a maximum recovery limit of $3 million per year against a potential tax reimbursement judgment by the Puerto Rico courts of over $200 million total ($30 to $40 million a year) and an estimated 4.6 years to judgment. Even that annual $3 million would not have been guaranteed to be paid, especially in light of mandated priorities putting other debts ahead of taxpayer debt. As to the merits of the Commerce Clause challenge, the AMT is a facially discriminatory statute that does not meet the heightened level of scrutiny required to survive under the dormant Commerce Clause.
I. Facts
The Commonwealth of Puerto Rico is in dire financial straits. Puerto Rico v. Franklin Cal. Tax-Free Tr., — U.S.-, 136 S.Ct. 1938, 1942, 195 L.Ed.2d 298 (2016); Puerto Rico Oversight, Management, and Economic Stability Act (“PROMESA”), Pub. L. No. 114-187, 130 Stat. 549 (2016). As the district court summarized its findings:
[T]he Commonwealth is being crushed under the weight of a public debt that is *113larger than its gross national product, Puerto Rico’s annual budget is running a structural deficit that is about [to] explode into the multibillion-dollar range, the government’s cash reserves are about to dry out, its credit rating is at junk status, it has started to default on its debt obligations, and it has no place to turn for external funding, including the possibly-insolvent Government Development Bank.
Wal-Mart P.R., Inc., 174 F.Supp.3d at 602, 2016 WL 1183091, at *8.1
A. The Amended AMT
Against this backdrop, the Puerto Rico legislature, in an effort to raise more tax revenue, amended the AMT in May 2015, as part of Act 72 of 2015. We begin by discussing the general structure of the AMT in order to explain the two ways in which Act 72 amended the AMT.
The AMT is a tax equal to the amount (if any) by which a corporate taxpayer’s tentative minimum tax. exceeds its regular tax on income. P.R. Laws Ann. tit. 13, § 30073(a).2 The tentative minimum tax is defined as the higher of two measures. Id. § 30073(b). The first measure, which is not relevant here, is calculated from the corporate taxpayer’s income. Id. § 30073(b)(1). The second measure, which is at issue here, is calculated from the value of goods and services sold or otherwise provided to the corporate taxpayer by a related entity or home office located outside of Puerto Rico. Id. § 30073(b)(2).
This second measure is the sum of two components: an expenses tax and .a tangible-property tax. Id. The expenses tax is a 20% tax on services provided to the corporate taxpayer by a related party3 or home office4 outside of Puerto Rico. Id. § 30073(b)(2)(A). The tangible-property tax is a tax on the goods sold or transferred to the corporate taxpayer by a related party or home office outside of Puer-to Rico. Id. § 30073(b)(2)(B). Prior to the 2015 amendment, the tangible-property tax was a 2% flat tax. The 2015 amendment provided new graduated rates for the AMT’s tangible-property tax, with a top rate of 6.5% for corporate taxpayers with $2.75 billion or more in gross sales in Puerto Rico.
The Secretary acknowledged that the purpose of the expenses and tangible-property taxes is to prevent multistate corporations doing business in Puerto Rico from shifting profits off the island by purchasing goods and services from related mainland entities at artificially inflated prices. The concern is that by manipulating prices for such transactions between related entities, a multistate taxpayer can shift profits to another jurisdiction with a lower tax *114rate and thereby artificially deflate its Puerto Rico income tax burden. The AMT accordingly applies only to transactions between a Puerto Rico taxpayer and a related entity located outside of Puerto Rico.
The absence of a potential problem of profit-shifting from a Puerto Rico taxpayer to a related entity outside of Puerto Rico may be indicated by a transfer price that is the same as the price at which unrelated parties would arrive through arm’s-length negotiation. As such, prior to the 2015 amendment, the AMT statute provided that the Secretary could tax a related-party transaction at a lower rate if he found that the transfer price paid by the taxpayer to the related entity was “equal or substantially similar to the [price] for which such related party sells such property to an unrelated party.” Id. § 30073(d)(4). In addition to the new graduated rates for the tangible-property tax, the second significant change in the 2015 AMT amendment was the elimination of this exemption.
The Secretary conceded in testimony before the district court that the amended AMT is no longer targeted at profit-shifting through transfer-pricing abuse but is instead simply “a revenue raising measure.” The district court credited this testimony and found that the amendment to the AMT was intended to raise tax revenues from multistate mega-retailers like Wal-Mart PR. Wal-Mart PR further alleges, and Puerto Rico does not dispute, that it is the only corporation that meets the sales threshold for the top tangible-property tax rate of 6.5%. Indeed, the new top rate under the amended AMT is alleged to be essentially a ‘Wal-Mart tax,” passed to raise a specific level of revenue from Wal-Mart PR in light of Puerto Rico’s budget crisis.
B. Wal-Mart PR
Wal-Mart PR is the largest private employer in Puerto Rico. It operates forty-eight stores in Puerto Rico and employs around 14,300 people. Each year, it buys around $1.6 billion of inventory locally and over $700 million of inventory from its parent company, Wal-Mart Stores, Inc., and related mainland entities. Each year, Wal-Mart PR earns roughly $3 billion in sales in Puerto Rico.
Wal-Mart PR’s tax year begins on February 1. The tax year commencing February 1, 2015 and ending January 31, 2016 (which we will call Fiscal Year 20165) was the first year in which Wal-Mart PR was subject to the new graduated tangible-property tax rate in the amended AMT.
In Fiscal Year 2012, Wal-Mart PR’s total income tax liability, to Puerto Rico was $19.9 million. The following year, it was $18.6 million. But in Fiscal Year 2016, Wal-Mart PR’s total tax liability rose to approximately $46.5 million, of which approximately $32.9 million would have been attributable to the amended AMT had the district court not enjoined that tax.6 Wal-Mart PR alleges that the amended AMT, if enforced, would have made its total tax liability 132% of the company’s total annual income. The AMT makes this percent*115age possible because the AMT taxes the transfer of goods and services to the corporate taxpayer, and it is not keyed to the taxpayer’s income. For a retailer like Wal-Mart PR that engages in a high volume of transactions with low profit margins on each item sold, this feature of the AMT can result in a particularly high tax liability relative to income.
Wal-Mart PR estimates that in future years, it will pay $40 million per year as a result of the amended AMT and that its annual effective tax rate will be over 300%.
II. Procedural History
On December 4, 2015, Wal-Mart PR commenced this action against Puerto Rico Secretary of the Treasury Juan Zaragoza-Gómez in his official capacity. Wal-Mart PR sought, under 42 U.S.C. § 1983, an injunction against the continued enforcement of the AMT against it and a declaration that the AMT is unlawful under the dormant Commerce Clause; the Equal-Protection Clause; the Bill of Attainder Clauses; and the Federal Relations Act, 48 U.S.C. § 741a.
On December 21, 2015, the Secretary filed a Rule 12(b)(1) motion to dismiss for lack of subject matter jurisdiction. The district court deferred resolution of the motion, citing the need for jurisdictional discovery. Following an expedited discovery period, the district court held an evi-dentiary hearing from February 2 to 5, 2016.
On March 28, 2016, the district court issued an order stating its findings of fact and conclusions of law. Fed. R. Civ. P. 52(a)(1). The district court held that: (1) it had jurisdiction under the Butler Act because of the lack of a “plain, speedy and efficient remedy” in Puerto Rico courts; (2) the AMT violates the dormant Commerce Clause; (3) the AMT violates the Federal Relations Act; (4) the AMT violates the Equal Protection Clause; and (5) the AMT does not violate the Bill of Attainder Clauses. As for the relief entered, the court “permanently enjoin[ed] and declare[d] invalid, under both federal constitutional and statutory law, section 1022.03(b)(2) and (d) of the Puerto Rico Internal Revenue Code of 2011.” Wal-Mart P.R., Inc., 174 F.Supp.3d at 652, 2016 WL 1183091, at *51. The court ordered the injunction to go into effect immediately.
This appeal followed.
III. Jurisdiction
Before we reach the constitutionality of the amended AMT, we must address three threshold matters raised by the Secretary: whether lack of standing or ripeness bars this suit, whether the Butler Act bars the exercise of federal district court jurisdiction in this case, and whether the principle of comity requires dismissal of this case. We take each in turn.
A. Standing and Ripeness
The Secretary argues that Wal-Mart PR had no standing to bring this suit because it had not filed a tax return prior to filing its complaint. The Secretary makes essentially the same argument in ripeness terms, arguing that the district court erred by' treating Wal-Mart PR’s payment of estimated quarterly taxes as sufficient to meet justiciability requirements. Our review is de novo. Summers v. Fin. Freedom Acquisition LLC, 807 F.3d 351, 355 (1st Cir. 2015); Sullivan v. City of Augusta, 511 F.3d 16, 24 (1st Cir. 2007).
Even though Wal-Mart PR had not filed its tax return at the commencement of this suit in the district court, it had already begun paying estimated quarterly taxes under the amended AMT statute prior to filing suit.. Those estimated quar*116terly payments were required by law, and nonpayment was subject to penalty. P.R. Laws Ann. tit. 13, § 30263(a), (h). Moreover, Puerto Rico law provides that “[p]ayment of the estimated tax ... shall be treated as payment on account of the tax for the taxable year.” Id. § 30263(g). Wal-Mart PR suffered a sufficiently cognizable injury in fact by the legally compelled payment of estimated taxes. And the fact that, at the time of adjudication before the district court, the exact tax figure was subject to adjustment upon the filing of the tax return did not prevent this case from being ripe for adjudication. The Secretary never contested that Wal-Mart PR was subject to some level of tax liability under the challenged version of the AMT, and no further factual development was necessary. See Verizon New Eng., Inc, v. Int’l Bhd. of Elec. Workers, Local No. 2322, 651 F.3d 176, 188 (1st Cir. 2011).7 Accordingly, we hold that Wal-Mart PR had standing to bring this suit and that the case was sufficiently ripe.
B. The Butler Act’s Jurisdictional Bar
1. Does the Butler Act contain an exception to its jurisdictional bar?
The Secretary argues that even if standing and ripeness requirements are met, the Butler Act’s jurisdictional bar deprives the Puerto Rico federal district court of jurisdiction over this action. WalMart PR, as the party invoking federal jurisdiction, has the burden of proving its existence. Calderón-Serra v. Wilmington Tr. Co., 715 F.3d 14, 17 (1st Cir. 2013). We review the district court’s findings on jurisdictional facts for clear error, but review its ultimate legal conclusion on jurisdiction de novo. See United States ex rel. Ondis v. City of Woonsocket, 587 F.3d 49, 54 (1st Cir. 2009); Valentin v. Hosp. Bella Vista, 254 F.3d 358, 365-66 (1st Cir. 2001). Puerto Rico does not contest the factual findings made, but contests the conclusions drawn from those facts.
The Butler Act states: “No suit for the purpose of restraining tbe assessment or collection of any tax imposed by the laws of Puerto Rico shall be maintained in the United States District Court for the District of Puerto Rico.” 48 U.S.C. § 872. The parties agree that this jurisdictional bar contains an unstated exception: it presumes that the Commonwealth itself provides a “plain, speedy and efficient” remedy for a taxpayer harmed by the imposition of an unconstitutional tax. Our own court has repeatedly acknowledged the likely existence of such an exception, but we have never found it applicable. See, e.g., Coors Brewing Co. v. Méndez-Torres, 562 F.3d 3, 13 & n.5 (1st Cir. 2009), abrogated on other grounds by Levin v. Commerce Energy, Inc., 560 U.S. 413, 130 S.Ct. 2323, 176 L.Ed.2d 1131 (2010); Carrier Corp. v. Perez, 677 F.2d 162, 164 (1st Cir. 1982). Nor have we explained in any detail why the exception does exist. Because we ultimately find the exception applicable in this ease and because the existence of jurisdiction is a matter that we must raise and ascertain sua sponte, see McCulloch v. Vélez, 364 F.3d 1, 5 (1st Cir. 2004), we begin by explaining why we agree with the parties *117that this appeal turns on whether the exception applies, not on whether it exists.
Long before the enactment of the Butler Act, federal courts of equity refused to interfere "with the collection of state taxes. See, e.g., Great Lakes Dredge & Dock Co. v. Huffman, 319 U.S. 293, 299, 63 S.Ct. 1070, 87 L.Ed. 1407 (1943). Nonetheless, the common law recognized an exception for those cases in which “the threatened injury to the taxpayer [wa]s one for which the state courts afford[ed] no adequate remedy.” Id.; see also Union Pac. R.R. Co. v. Bd. of Cty. Comm’rs, 247 U.S. 282, 285, 38 S.Ct. 510, 62 L.Ed. 1110 (1918) (collecting cases for the proposition that if state revenue laws provided a “plain, adequate and complete remedy at law’ to refund tax payments, “relief by injunction [wa]s not admissible”).8
Against this backdrop, Congress enacted the Butler Act of 1927. In light of the longstanding common-law recognition of an exception to the general jurisdictional bar, the Butler Act is presumed to include that exception. See Norfolk Redev. & Hous. Auth. v. Chesapeake & Potomac Tel. Co. of Va., 464 U.S. 30, 35-36, 104 S.Ct. 304, 78 L.Ed.2d 29 (1983) (“It is a well-established principle of statutory construction that ‘[t]he common law ... ought not to be deemed to be repealed, unless the language of a statute be clear and explicit for this purpose.’ ” (alterations in original) (quoting Fairfax’s Devisee v. Hunter’s Lessee, 11 U.S. (7 Cranch) 603, 623, 3 L.Ed. 453 (1813))); see also U.S. Brewers Ass’n, Inc. v. Perez, 592 F.2d 1212, 1213 n.2 (1st Cir. 1979) (“The district court’s reluctance to read the Butler Act as an absolute ban, construing it instead ‘in a manner consistent with general equitable principles’ was generally in accord with the limited case law applying that Act.”), abrogated on other grounds by Coors Brewing Co., 562 F.3d 3.
The legislative history of the Butler Act only confirms this reading. The principal purpose of the statute was to “apply the same rule [of tax collection and litigation] in P[ue]rto Rico that now applies on the continent of the United States.” Sancho v. Nat’l City Bank of N.Y., 112 F.2d 998, 999 (1st Cir. 1940) (quoting 68 Cong. Rec. S5025 (daily ed. Feb. 28, 1927) (statement of Sen. Bingham)). To the extent that the pre-Butler Act common law in the continental United States recognized an exception to the federal jurisdictional bar and that the Butler Act’s purpose was to “make the condition [in Puerto Rico] just the same as in the United States,” 68 Cong. Rec. S5026 (daily ed. Feb. 28, 1927) (statement of Sen. Bingham), reading the Butler Act to include the exception as well is consistent with the drafters’ purpose. By including the exception, we also avoid construing the statute in a manner that suggests Congress would set up a jurisdictional system in which an aggrieved taxpayer would have no recourse, either local or federal.
The enactment of the Tax Injunction Act of 1937 (“TIA”), 28 U.S.C. § 1341, further *118evinces Congress’s adherence to the tradition of preserving an exception to the federal jurisdictional bar where taxpayers had no remedy in state courts after paying an illegal tax. The TIA deprives federal district courts of jurisdiction to enjoin the collection of state taxes. Pleasures of San Patricio, Inc, v. Méndez-Torres, 596 F.3d 1, 5 (1st Cir. 2010); see also Hibbs v. Winn, 542 U.S. 88, 109 n.11, 124 S.Ct. 2276, 159 L.Ed.2d 172 (2004). Congress intended the TIA to be “first and foremost a vehicle to limit drastically federal district court jurisdiction to interfere with so important a local concern as the collection of taxes.” Rosewell v. LaSalle Nat’l Bank, 450 U.S. 503, 522, 101 S.Ct. 1221, 67 L.Ed.2d 464 (1981). After all, states rely on taxes “to carry on their respective governments,” and “[a]ny delay in the proceedings of the officers, upon whom the duty is devolved of collecting the taxes, may derange the operations of government, and thereby cause serious detriment to the public.” Fair Assessment in Real Estate Ass’n, Inc. v. McNary, 454 U.S. 100, 127, 102 S.Ct. 177, 70 L.Ed.2d 271 (1981) (Brennan, J., concurring in the judgment) (quoting Dows v. City of Chicago, 78 U.S. (11 Wall.) 108, 110, 20 L.Ed. 65 (1871)).
But, unlike the Butler Act, the TIA contains an express exception under which federal district courts can assume jurisdiction where state courts do not provide a “plain, speedy and efficient remedy.” 28 U.S.C. § 1341. The historical context in which each statute was enacted helps explain why Congress expressly codified an exception in the TIA when it did not do so in the Butler Act. The Senate floor statements of the Butler Act’s drafters imply that Puerto Rico, at the time of enactment, provided a remedy for illegal tax payments. See 68 Cong. Rec. S5026 (daily ed. Feb. 28, 1927) (Sen. Norris: “There is ample provision made, as I understand the law, for the return of taxes that are illegally paid.” Sen. Bingham: “Oh, yes; there is no question about that.”). Not all states at that time, however, provided such recourse for taxes paid under protest. See Grosjean v. Am. Press Co., 297 U.S. 233, 242, 56 S.Ct. 444, 80 L.Ed. 660 (1936). As Puerto Rico offered a remedy that some states did not, articulating the implied equitable exception in the text of the Butler Act may not have seemed critical to its drafters.
By contrast, when Congress enacted the TIA ten years later, the need to affirmatively build the exception into the statutory text was more pronounced. First, as discussed above, some states at the time “afford[ed] no remedy whereby restitution of taxes and property exacted m[ight] be enforced, even where payment ha[d] been made under both protest and compulsion.” Id. Furthermore, the Great Depression had intervened between the passage of the Butler Act in 1927 and the TIA in 1937, resulting in scenarios in which even those states that had in place remedial schemes could not provide relief in fact. See, e.g., Stewart Dry Goods Co. v. Lewis, 287 U.S. 9, 10-11, 53 S.Ct. 68, 77 L.Ed. 135 (1932) (per curiam) (recognizing that despite formal remedy available under Kentucky law, taxpayers could not actually collect, “for lack of funds in the Treasury”). In light of the disparate laws and financial realities of the various states at the time of the TIA’s enactment, it makes sense that the TIA expressly codifies the exception included impliedly in the Butler Act.
Of course, although the TIA has its roots in federal equity practice, its exception is statutory and not equitable. In Rosewell, the Court cautioned that the TIA’s “plain, speedy and efficient remedy” exception should not necessarily be read as “coterminous with pre-1937 federal equity treatment of challenges to state taxes.” 450 U.S. at 524, 101 S.Ct. 1221. Rosewell serves two purposes. It first recognizes the *119“longstanding rule of federal equity to keep out of state tax matters as long as a ‘plain, adequate and complete remedy’ could be had at law.” Id. at 525, 101 S.Ct. 1221. Second, by construing the TIA’s exception as narrower than prior federal equity practice, Rosewell signals that the role of the federal courts is now to interpret the precise language of the statutory exception, rather than rely on the former, more amorphous equitable exception standard.
As acknowledged above, the Butler Act and the TIA “have been construed in pari materia” in our circuit, which has extended the TIA’s exception to the Butler Act.9 Pleasures of San Patricio, 596 F.3d at 5 (quoting United Parcel Serv., Inc. v. Flores-Galarza, 318 F.3d 323, 330 n.11 (1st Cir. 2003)). Accordingly, the Butler Act has been interpreted to allow the Puerto Rico federal district court to enjoin a Puer-to Rico tax where there was no plain, speedy and efficient remedy, presumably within the meaning of the TIA, available in the Puerto Rico courts. Id This “judicially engrafted exception” to the Butler Act is well established in this circuit. Parker v. Agosto-Alicea, 878 F.2d 557, 558-59 (1st Cir. 1989); Carrier Corp., 677 F.2d at 164.
At the conclusion of our survey of the Butler Act and the TIA, we must acknowledge that the timeline of the two statutes’ enactments suggests that the Butler Act of 1927 incorporated the common law equitable exception, but we cannot say whether our subsequent construction of the Butler Act in pari materia with the TIA narrowed that exception. We need not resolve this question here, however, as this case qualifies under the narrower TIA exception, and that is all that Wal-Mart PR itself claims. After independently reviewing the historical context and legislative history of the Butler Act and TIA, we reaffirm that the Butler Act’s jurisdictional bar is subject to an exception that is at least coextensive with the TIA’s exception.
2. Is this case within the exception to the Butler Act?
The parties agree that this suit has the purpose of restraining the assessment or collection of a Puerto Rico tax, so the jurisdictional bar of the Butler Act is in play. The remaining question is whether the exception to the Butler Act applies on the basis that, under Puerto Rico law, the Puerto Rico courts cannot provide a plain, speedy, and efficient remedy. If that exception does not apply, then the Butler Act bars the district court from exercising jurisdiction, and we would dismiss the case without reaching the question of the amended AMT’s constitutionality. By far this is the most difficult question presented by this case.
The only local remedy available to Wal-Mart PR in the Puerto Rico courts is Puerto Rico’s tax-refund process. P.R. Laws Ann. tit. 13, § 261; Pleasures of San Patricio, Inc., 596 F.3d at 7. Under the tax-refund process, a taxpayer contesting a tax must first pay the contested tax and then file a tax return requesting a refund or credit from the Secretary of the Treasury. Pleasures of San Patricio, Inc., 596 F.3d at 7. If the Secretary denies the refund, the taxpayer may appeal the denial in the Puerto Rico court system and then seek review by certiorari in the United States Supreme Court. Id. at 8. We have held in *120previous eases — before enactment of the amended AMT now being challenged, the Special Fiscal and Operational Sustainability Act of 2014 (“Fiscal Sustainability Act”), and Treasury regulations awarding priority to other Puerto Rico debt payments over tax refunds — that this tax-refund process is a plain, speedy, and efficient remedy for the purpose of the Butler Act because it provides the taxpayer with a full hearing and judicial determination of any constitutional objections to a tax. Id. at 8-9; Carrier Corp., 677 F.2d at 164.
The district court held that notwithstanding our previous cases, Puerto Rico’s current financial legislation and status compelled the opposite conclusion. The district court projected that under the most conservative estimate, in which denial of the refund by the Treasury takes one year and Wal-Mart PR successfully obtains an injunction on the collection of the AMT from the Puerto Rico Court of First Instance, Wal-Mart PR would be entitled to a $70 million tax refund — the $30 million for Fiscal Year 2016 and another estimated $40 million for the following year. Wal-Mart PR asserts that the more realistic tax-refund liability figure if it continues to do business in Puerto Rico at the present AMT rate is $214 million.10 The district court found that Puerto Rico would be unable under the current state of affairs to satisfy a judgment of $70 million (or, for that matter, $214 million).
More critically, the district court noted that Puerto Rico law had recently been altered, as part of the Fiscal Sustainability Act, to impose a new obstacle by capping the payment of any judgment exceeding $20 million against the Commonwealth at $3 million per year. The district court also noted that Puerto Rico can refuse to honor even that $3 million annual payment “whenever it finds there are ‘no funds available’ that year.” Wal-Mart P.R., Inc., 174 F.Supp.3d at 628, 2016 WL 1183091, at *30. It further found that such postponement is likely to occur almost indefinitely because recent Puerto Rico Treasury guidelines prioritize payment of other government obligations over the payment of tax refunds. In addition, the district court concluded that there were no tax credits available under Puerto Rico law that would suffice as an alternative adequate remedy for Wal-Mart PR. The district court’s reasoning, in short, was that even if Puerto Rico law furnishes Wal-Mart PR with a sufficient procedural avenue for challenging the AMT, there is still no plain, speedy, and efficient remedy because of the inability of Puerto Rico courts to see to it that an ultimate judgment in favor of Wal-Mart PR is satisfied. In response, Puerto Rico asserts that it may force Wal-Mart PR to pay over $200 million in unconstitutionally imposed taxes and make Wal-Mart PR wait a minimum of seventy years for repayment, if then.
We agree with the district court that Puerto Rico has now hamstrung its courts so as to deprive Wal-Mart PR of a plain, speedy, and efficient remedy at the time of this suit. Indeed, the local remedy available to Wal-Mart PR today is fundamentally different from what would have been available before the enactment of the *121Fiscal Sustainability Act and recent Treasury guidelines. To elaborate, the Secretary does not challenge the district court’s projection that, even under the most conservative estimate, the Puerto Rico tax-refund process would require Wal-Mart PR to make $70 million in AMT payments before Wal-Mart PR can, if then, obtain an injunction against the AMT in the Puerto Rico courts. Nor does the Secretary challenge the district court’s prediction that, because of the $3 million statutory cap, Wal-Mart PR may never receive a full refund. And even if it does, the full refund will take well over the apparent minimum of two decades because payment of even $3 million per year is likely to be postponed indefinitely, with no evident recourse for Wal-Mart PR.
The Secretary instead argues that even a total inability by Puerto Rico to satisfy a tax-refund judgment would not justify federal jurisdiction because “plain, speedy, and efficient” refers only to the procedural adequacy of Puerto Rico’s local remedy. According to the Secretary, Puerto Rico’s tax-refund process provides the taxpayer with a full hearing and judicial determination of any constitutional objections to the tax, and Wal-Mart PR’s ability to obtain a tax-refund judgment through that procedure makes the Puerto Rico remedy a plain, speedy, and efficient one. Under that reasoning, we would make no inquiry into what happens after the Puerto Rico judicial process produces a tax-refund judgment. Of course, that would require us to ignore the word “remedy” in the Act.
The Secretary’s argument relies on the Supreme Court’s decision in Rosewell. In our view, the Secretary overreads that case. In Rosewell, the Court held that Illinois’s tax-refund procedure was a plain, speedy, and efficient remedy for a tax challenger even though a successful challenger would wait two years and receive no interest for any taxes refunded. 450 U.S. at 528, 101 S.Ct. Í221. In so holding, the Supreme Court used language suggesting that “plain, speedy and efficient” in the TIA refers to the “procedural” adequacy of the local remedy, id. at 512, 101 S.Ct. 1221, rather than the “more substantive concern” of whether the recovery included payment of interest, id. at 515, 101 S.Ct. 1221.
But unlike in this case, there is no indication in Rosewell that the county government was unable to pay the full value (without interest) of the tax refund at the conclusion of the refund process in the courts. See, e.g., id. at 507, 101 S.Ct. 1221 n.5. We do not read Rosewell as bearing on a situation where, as alleged here, the taxpayer is afforded adequate process in obtaining a tax-refund judgment but where local laws also largely insure that the judgment is worthless for all practical purposes. Indeed, in light of the annual $3 million cap on payments of judgments against the Commonwealth and the discretion it has to reduce even that amount, the priority given other debts over Wal-Mart PR’s debt, and the notably large sum (far exceeding the $3 million cap for every year of tax liability) that Wal-Mart PR would be owed by the time a Puerto Rico court ruled on the matter and Wal-Mart PR prevailed, Wal-Mart PR’s AMT payments, if unconstitutional, would effectively be un-collectable. This would be so even after Wal-Mart PR completed the tax-refund process and obtained a successful judgment. Given these realities, in our view, Puerto Rico law does not provide a plain, speedy, and efficient remedy to bar federal district court jurisdiction over this case.
Two Supreme Court cases and at least one circuit ease support our conclusion that a local government’s inability to satisfy a tax-refund judgment, thus depriving a taxpayer of any “remedy,” could make a *122local tax-refund process inadequate so as to support federal injunctive relief. In Matthews v. Rodgers, the Supreme Court stated that a local tax-refund action is an “adequate legal remedy” that forecloses exercise of federal equitable jurisdiction unless there are “special circumstances showing inability of ... the collecting officer to respond to the judgment.” 284 U.S. 521, 528, 52 S.Ct. 217, 76 L.Ed. 447 (1932).
Also, in Stewart Dry Goods, the Supreme Court vacated the district court’s dismissal of a tax challenge and remanded it to the district court for further factfind-ing on whether the local tax-refund procedure was inadequate because, at the time of the suit’s commencement, there were already outstanding unpaid warrants totaling $9.8 million against Kentucky’s general fund that “c[ould] not be collected ... for lack of funds in the Treasury.” 287 U.S. at 11, 53 S.Ct. 68. The district court on remand took jurisdiction upon finding Kentucky’s tax-refund procedures inadequate, Stewart Dry Goods Co. v. Lewis, 7 F.Supp. 438, 440 (W.D. Ky. 1933), and the Supreme Court accepted jurisdiction without question in a subsequent appeal on the merits question of the state tax’s constitutionality, Stewart Dry Goods Co. v. Lewis, 294 U.S. 550, 552, 55 S.Ct. 525, 79 L.Ed. 1054 (1935).11
Finally, in Adams County v. Northern Pacific Railway Co., the Ninth Circuit cited Stewart Dry Goods in holding that.a local tax-refund procedure was not plain, speedy, and efficient for the purpose of the TIA where “some of the defendant counties [we]re insolvent and ... in consequence a judgment for plaintiff in such an action would, as to such counties, result only in the issuance of uncollectible warrants.” 115 F.2d 768, 776 (9th Cir. 1940). To recap, our holding does not turn on the delay in the process of using the Puerto Rico courts; their procedures have not been shown to be inadequate. Nor do we rely on any concept of inefficiency. But by enacting the Fiscal Sustainability Act’s $3 million annual cap on judgments exceeding $20 million and adopting Treasury guidelines that prioritize other debts over tax refunds, Puerto Rico has chosen to severely restrict the ability of its courts to provide adequate remedies to Wal-Mart PR.
The Secretary argued below and on appeal that Puerto Rico’s ability to offer a refund is immaterial because Wal-Mart PR can, if successful in Puerto Rico court, have any past overpayment applied to its future tax obligations. Two credits are available. First, section 6021.02 of Puerto Rico’s Internal Revenue Code provides: ‘When a payment in excess of any taxes imposed by [the relevant title] has been made, the amount of such payment in excess shall be credited, by request of the taxpayer or on the initiative of the Secretary, ... against any taxes imposed by this Code ..., and any remainder shall be immediately refunded to the taxpayer.” P.R. Laws Ann. tit. 13, § 33022(a)(1). The district court, however, found that this credit applies only to “payment in excess of any taxes imposed” and so is not available where a taxpayer pays an amount actually then due but is later entitled to a refund because the “taxes imposed” were illegal. The Secretary offers no contrary view on appeal and so has waived any argument that the first credit is an available remedy in Wal-Mart PR’s case.
Second, the Secretary cites another section of Puerto Rico’s Internal Revenue *123Code, which provides for a minimum tax credit. P.R. Laws Ann. tit. 13, § 30202. The language of the statute is circular, but the undisputed interpretation the district court adopted is that a taxpayer who has paid AMT in prior years (because its tentative minimum tax exceeded its ordinary tax liability in those years) may credit this AMT against its tax obligations in years in which its ordinary tax liability exceeds its tentative minimum tax. In any year in which this credit applies, however, the credit is capped at 25% of the amount by which the taxpayer’s ordinary tax liability exceeds its tentative minimum tax in that year. The district court found that the Fiscal Sustainability Act’s $3 million annual recovery cap applies to this credit, and neither party argues on appeal that this finding was error. The second credit thus suffers from precisely the same inadequacy as does the tax refund option: under either remedy, Wal-Mart PR will not be made whole for decades, if even then.
We stress again that we do not hold that a mere delay in recovery renders a remedy inadequate. In normal course, one would not be surprised that it might take several years to litigate a refund claim and collect the judgment. The Supreme Court has held, for example, that a two-year delay with no interest does not render a state remedy inadequate. See Rosewell, 450 U.S. at 520-21, 101 S.Ct. 1221. Wal-Mart PR’s case, therefore, might be very different if it faced a $21 million overpayment that might take seven years to collect at $3 million per year. Where one draws the line, we need not say other than that twenty-three years is on the other side.
3. PROMESA
We take judicial notice of the fact that, since the district court’s March decision, Congress has passed PROMESA, which attempts to address Puerto Rico’s fiscal crisis by establishing the Financial Oversight and Management Board (“the Board”) and a process for Puerto Rico to restructure its debt.12 PROMESA § 101(a), (b)(1). The parties agree that PROMESA does not affect the jurisdictional analysis under the Butler Act. Neither party asserts that PROMESA’s stay provision applies to this lawsuit or that the Board has the power to grant the relief that Wal-Mart PR seeks. We likewise agree, for the two reasons already noted.
First, PROMESA’s stay provision does not apply to this case. Section 405 provides for an automatic “stay,” effective on the date of the Act’s enactment, of certain judicial actions “with respect to a Liability.” Id. § 405(b). PROMESA’s definition of “Liability,” however, includes only “bond[s], loan[s], ... or other financial indebtedness for borrowed money.” Id. § 405(a)(1). The remedy that Wal-Mart PR seeks — relief from payment of future taxes — does not constitute money that Puerto Rico has borrowed. It rather constitutes future potential tax revenue. Because this suit will not force Puerto Rico to pay any amount of money to Wal-Mart PR, section 405’s stay provision is inapposite.
Second, the Board cannot grant the relief that Wal-Mart PR seeks. Under section 201, the Board must approve a Fiscal Plan that “provide[s] a method to achieve fiscal responsibility and access to the capital markets.” Id. § 201(b)(1). That Plan must, however, respect the Commonwealth’s “relative lawful priorities” that were in effect prior to PROMESA’s enactment. Id. § 201(b)(l)(N) (“A Fiscal Plan developed under this section shall ... respect the relative lawful priorities or lawful *124liens, as may be applicable, in the constitution, other laws, or agreements ... in effect prior to the date of enactment of this Act.”). Accordingly, PROMESA appears to grant no power to the Board to repeal or amend the Fiscal Sustainability Act, which continues to cap payments of court judgments at $3 million per year and continues to grant Puerto Rico discretion not to pay even that amount depending on the availability of funds that year. Nor does it appear to allow the Board to repeal or amend the Treasury guidelines, which “prioritize some government payment obligations over others” but make “no provision ... to prioritize the payment of a court judgment ordering a tax refund.” Wal-Mart P.R., Inc., 174 F.Supp.3d at 628, 2016 WL 1183091, at *30. If anything, a purpose of PROMESA is to increase Puer-to Rico’s tax revenues.13 Ultimately, PROMESA does not change the almost certain likelihood that Wal-Mart PR will not recover its tax debt if it complies with the .transfer-based AMT first and then seeks relief through the tax-refund process. And that near certainty of nonrecov-ery suffices to make the local remedy inadequate and justifies the exercise of federal district court jurisdiction to issue injunc-tive relief. See Rosewell, 450 U.S. at 516—17 & n.21, 101 S.Ct. 1221.
C. Comity
The Secretary argues that the principle of comity independently compelled the district court to abstain from exercising jurisdiction. We review de novo. See Esso Standard Oil Co. v. Cotto, 389 F.3d 212, 217 (1st Cir. 2004) (citing Brooks v. N.H. Sup. Ct., 80 F.3d 633, 637 (1st Cir. 1996)).
“The comity doctrine counsels lower federal courts to resist engagement in certain eases falling within their jurisdiction.” Levin, 560 U.S. at 421, 130 S.Ct. 2323. “Comity’s constraint has particular force when lower federal courts are asked to pass on the constitutionality of state taxation of commercial activity.” Id. Indeed, “the comity doctrine is more embracive than the TIA.” Id. at 424, 130 S.Ct. 2323; see also Coors Brewing Co. v. Méndez-Torres, 678 F.3d 15, 22 (1st Cir. 2012) (“[E]ven if the TIA does not bar federal court jurisdiction in certain classes of state tax challenges, comity may require dismissal nonetheless.”). Although we rely on comity precedents that refer to states, our circuit has applied comity considerations to Puerto Rico in the same way as we do to states. See, e.g., Torres-Rivera v. García-Padilla, 783 F.3d 42, 46 (1st Cir. 2015); Casiano-Montañez v. State Ins. Fund Corp., 707 F.3d 124, 129-30 (1st Cir. 2013).
Comity is not an absolute bar to a federal district court passing judgment on the lawfulness of a local tax. The Supreme Court has repeatedly stated that comity bars federal district court jurisdiction only insofar as the local court system affords an adequate remedy. See, e.g., Levin, 560 U.S. at 421, 130 S.Ct. 2323 (stating that comity limits federal jurisdiction “given that an adequate state-court forum is available” to adjudicate the claims); Fair Assessment in Real Estate Ass’n, Inc., 454 U.S. at 116, 102 S.Ct. 177 (comity limits federal jurisdiction “provided of course that [state] remedies are plain, adequate, and complete”); Tully v. Griffin, Inc., 429 U.S. 68, 73, 97 S.Ct. 219, 50 L.Ed.2d 227 *125(1976) (comity limits federal jurisdiction “except in cases where an asserted federal right might otherwise be lost”). The Supreme Court has also suggested that adequacy of the state system for comity purposes is the same standard as “plain, speedy and efficient” under the TIA (and, as a result, the Butler Act). Fair Assessment in Real Estate Ass’n, Inc., 454 U.S. at 116 n.8, 102 S.Ct. 177.
As such, the same analysis we applied to the Butler Act applies to the comity doctrine on these facts. When the Supreme Court stated in Levin that the restraint on federal jurisdiction under the comity doctrine is' broader than that under the TIA, it was referring to a matter that is not at issue here: a case in which a federal court seeks not to enjoin a state tax but instead to increase a commercial competitor’s tax burden. Levin, 560 U.S. at 417, 180 S.Ct. 2823. Such a case does not trigger the TIA because the requested relief does not “disrupt the flow of tax revenue” to the state. Id. at 419, 130 S.Ct. 2323. Nonetheless, the Supreme Court held that comity concerns restrained federal jurisdiction over such a case because of the limited “remedial competence” of the federal court relative to the state court. Id. at 428, 130 S.Ct. 2323. The concern in such a situation is that upon the finding of an unlawful tax classification, increasing the tax burden on the competitor requires an interference with the state’s tax code, an act that the state court is “better positioned” to conduct. Id. at 429, 130 S.Ct. 2323. Our circuit applied Levin’s reasoning to a similar situation in Coors Brewing Co., 678 F.3d at 24.
The same is not true here because the requested relief is invalidation of the tax, and, because the Butler Act does not apply, that remedy is equally available in state and federal court. In other words, the federal district court has equal remedial competence as the Puerto Rico courts in this case. Accordingly, Levin and Coors Brewing Co. are inapposite, and the Secretary’s reliance on those cases is misplaced. Even if the standards were different, we would reach the same conclusion about comity. The Puerto Rico legislature has chosen to limit the competence of its courts to effectuate relief. Comity does not bar this action.
Having cleared the threshold obstacles, we can proceed to the merits of this appeal.14
IV. The Dormant Commerce Clause
On the merits, the question is whether, as the district court held, the amended AMT violates the dormant Commerce Clause. The district court held a bench trial, so our review of its factual findings are for clear error, although we review legal determinations de novo. Wine & Spirits Retailers, Inc, v. Rhode Island, 481 F.3d 1, 4 (1st Cir. 2007).
The dormant Commerce Clause is an implied limitation from the Commerce Clause that “precludes States from ‘discriminating] between transactions on the basis of some interstate element.’ ” Comptroller of Treasury of Md. v. *126Wynne, - U.S. -, 135 S.Ct. 1787, 1794, 191 L.Ed.2d 813 (2015) (alteration in original) (quoting Bos. Stock Exch. v. State Tax Comm’n, 429 U.S. 318, 332 n.12, 97 S.Ct. 599, 50 L.Ed.2d 514 (1977)). As such, “a State ‘may not tax a transaction or incident more heavily when it crosses state lines than when it occurs entirely within the State.’” Id. (quoting Armco Inc. v. Hardesty, 467 U.S. 638, 642, 104 S.Ct. 2620, 81 L.Ed.2d 540 (1984)). Although we rely on cases that refer to “states,” we have held that the dormant Commerce Clause applies to Puerto Rico, in the same way that it applies to states. Walgreen Co. v. Rullan, 405 F.3d 50, 55 (1st Cir. 2005); United Egg Producers v. Dep’t of Agric., 77 F.3d 567, 569 (1st Cir. 1996).
In applying the dormant Commerce Clause, we first determine whether a law “discriminates on its face against interstate commerce.” United Haulers Ass’n, Inc, v. Oneida-Herkimer Solid Waste Mgmt. Auth., 550 U.S. 330, 338, 127 S.Ct. 1786, 167 L.Ed.2d 655 (2007). If we determine that the law is facially discriminatory, it is “virtually per se ... invalid[ ],” id. (quoting City of Philadelphia v. New Jersey, 437 U.S. 617, 624, 98 S.Ct. 2531, 57 L.Ed.2d 475 (1978)), and is permissible only upon “a showing that the State has no other means to advance a legitimate local purpose,” id. at 338-39,127 S.Ct. 1786 (citing Maine v. Taylor, 477 U.S. 131, 138, 106 S.Ct. 2440, 91 L.Ed.2d 110 (1986)).
It is indisputable that the amended AMT discriminates: it taxes only cross-border transactions between a Puerto Rico corporate taxpayer and a home office or related entity outside of Puerto Rico. The district court held that the amended AMT was facially discriminatory. We agree.
The Secretary’s argument, as articulated at oral argument, appears to be that the AMT dofes not facially discriminate against interstate commerce because it does not apply to particular interjurisdictional transfers but is instead merely a component in calculating an annual tax formula. But even if we accept that argument, the practical effects of the AMT demonstrate that it is unconstitutionally discriminatory. Whether or not the AMT is one component in a broader tax scheme, the AMT nonetheless applies only to interjurisdictional transfers within a corporate. family. The resulting “differential treatment of in-state and out-of-state economic interests that benefits the former and burdens the latter” is discriminatory. Family Winemakers of Cal. v. Jenkins, 592 F.3d 1, 9 (1st Cir. 2010) (quoting Or. Waste Sys., Inc. v. Dep’t of Envtl. Quality, 511 U.S. 93, 99, 114 S.Ct. 1345, 128 L.Ed.2d 13 (1994)).
The “internal consistency” test developed by the Supreme Court confirms the AMT’s discriminatory effect. This test “looks to the structure of the tax at issue to see whether its identical application by every State in the Union would place interstate commerce at a disadvantage as compared with commerce intrastate.” Wynne, 135 S.Ct. at 1802 (quoting Okla. Tax Comm’n v. Jefferson Lines, Inc., 514 U.S. 175, 185, 115 S.Ct. 1331, 131 L.Ed.2d 261 (1995), superseded on other grounds by 49 U.S.C. § 14505). The AMT fails the internal consistency test because if every state were to adopt the AMT, multistate corporations doing business across state lines would be disadvantaged relative to corporations whose operations are consolidated in one state. In such a world, the AMT’s tangible-property tax would preclude mul-tistate corporations from enjoying the functional integration, centralization of management, and economies of scale associated with their interstate business mod*127el.15 See Wal-Mart P.R., Inc., 174 F.Supp.3d at 641, 2016 WL 1183091, at *41 (citing Princo Corp. v. Int’l Trade Comm’n, 616 F.3d 1318, 1335 (Fed. Cir. 2010) (en banc)).
The Secretary’s next argument is that even if the AMT is discriminatory on its face or in effect, it survives dormant Commerce Clause scrutiny because it is “a proxy for the tax that would be imposed upon profits that are shifted to related parties.” The Secretary is correct that Puerto Rico has a legitimate interest in ensuring that multistate corporations are appropriately and proportionately taxed based on their activities within each jurisdiction in which they operate. Cf. Container Corp. of Am. v. Franchise Tax Bd., 463 U.S. 159, 164-65, 103 S.Ct. 2933, 77 L.Ed.2d 545 (1983). While the Secretary admitted at the evidentiary. hearing that there was no reason to believe that Wal-Mart PR had actually been engaging in abusive profit-shifting, the general problem of artificial profit-shifting by multi-state corporations is the object of a legitimate state interest.
However, if the AMT is to pass muster under the dormant Commerce Clause, the Secretary must also show that there is “no other means to advance [the] legitimate local purpose.” United Haulers Ass’n, Inc., 550 U.S. at 338-39, 127 S.Ct. 1786 (citing Taylor, 477 U.S. at 138, 106 S.Ct. 2440); see also Or. Waste Sys., Inc., 511 U.S. at 101, 114 S.Ct. 1345 (“cannot be adequately served by reasonable nondiscriminatory alternatives” (quoting New Energy Co. of Ind. v. Limbach, 486 U.S. 269, 278, 108 S.Ct. 1803, 100 L.Ed.2d 302 (1988))); Hughes v. Oklahoma, 441 U.S. 322, 337, 99 S.Ct. 1727, 60 L.Ed.2d 250 (1979) (“the strictest scrutiny of ... the absence of nondiscriminatory alternatives”). This the Secretary cannot do.
The amended AMT is a blunt and unnecessarily overinclusive approach to combat-ting profit-shifting abuse. It essentially establishes an irrebuttable presumption that all intercorporate transfers to a Puerto Rico branch from related mainland entities are fraudulently priced to evade taxes. In fact, the Secretary all but admits that there are narrower alternatives that target profit-shifting.16 One example is a unitary tax system that uses a formula to distribute multistate corporations’ income, for tax purposes, to different jurisdictions. Another example is the already existing set of regulations “that authorize the Puerto Rico Treasury to conduct a traditional transfer-pricing audit of interstate transactions between related parties and to adjust specific transfer prices ... to recapture [improperly shifted] profits.”17 Wal-Mart *128P.R., Inc., 174 F.Supp.3d at 643, 2016 WL 1183091, at *43. Having identified numerous less restrictive alternatives to advance Puerto Rico’s legitimate local purpose, we hold that the AMT is a facially discriminatory law that does not survive heightened scrutiny under the dormant Commerce Clause.
V. Conclusion
In light of the foregoing, we need not decide whether the AMT also violates the Federal Relations Act or the Equal Protection Clause.
We affirm.