Two of the thorniest issues in mortgage-backed securities litigation—plaintiffs’ standing and the time limits that govern their claims—have made a mess of a long-running case against Morgan Stanley. As the judge mulls whether to certify the case as a class action, Morgan Stanley and its lawyers at Davis Polk & Wardwell won a ruling this week that could help derail the case for good—or complicate matters even further.

In a 10-page order issued on Tuesday, U.S. District Judge Laura Taylor Swain in Manhattan reversed a previous decision and ruled that three of the four institutional investors leading the case didn’t bring suit within the relevant three-year statute of repose. The ruling may make it harder for plaintiffs counsel at Bernstein Litowitz Berger & Grossmann and Robbins Geller Rudman & Dowd to certify a large class in the case, though the judge made it clear that they still have a chance.