A U.S. district judge mistakenly conflated the injury requirement to have standing with the issue of the case’s merits in a suit over allegedly illegal insurance, the U.S. Court of Appeals for the Second Circuit said Thursday.

The panel, composed of Circuit Judges Rosemary Pooler, Richard Wesley and Peter Hall, vacated the March 2015 dismissal by U.S. District Judge Paul Gardephe of a class action brought by former holders of an accidental disability and medical expense insurance policy. The defendants—insurance companies, banks, and credit card companies—pitched the insurance to credit card holders, even as they allegedly knew the insurance policy was bogus from the start.

The plaintiffs claimed their HealthExtras insurance policies were not issued by eligible entities under state law, did not have approval from the state’s Department of Insurance, and lacked required provisions.

Gardephe dismissed the class action for lack of standing, finding that, since none of the plaintiffs ever tried to actually use the insurance, they couldn’t establish an injury in fact.

At issue was a New York State law that requires a policy to be enforced, even if it’s illegal. The class members could have sought to enforce the policy, then, should they have tried, but since they didn’t, there was no injury in fact, the district court found. A mere statutory violation wasn’t enough to earn them standing.

That was the wrong call, the panel found. Regardless of the merits of the claims, if it’s a concrete injury—in this case, years of payments for the unused insurance policies—caused by the violation of a statute, it’s enough to establish standing.

The panel found an additional issue with how the district court resolved the case. No New York State court has interpreted the insurance law at issue as precluding an insured person’s ability to bring a claim for a refund of the premiums paid for an illegal insurance policy. The panel said reading of the so-called savings clause of the law as such would seemingly conflict with the clear aims of protecting consumers from bogus insurance schemes.

While noting this point meant “no criticism of a very able District Court judge,” the panel said Gardephe’s “conflating the merits questions with the standing inquiry” may have resulted in the court failing to “give due consideration to this novel question of state law and reached an outcome that would preclude putative plaintiffs from seeking redress in state or federal court.”

Lackey Hershman partner Roger Mandel represented the plaintiffs on appeal. Paul, Weiss, Rifkind, Wharton & Garrison partner H. Christopher Boehning was counsel for Federal Insurance Co., while Winstead PC associate Stephen Clarke represented Stonebridge Life Insurance Co. None responded to a request for comment on the decision.