Say that everything that Kesha alleges about the producer Dr. Luke raping and abusing her is true. She still loses her lawsuit against him.

This is not a hypothetical scenario. In the ruling where the New York judge Shirley Werner Kornreich dismissed all of Kesha’s claims against the man born Lukasz Gottwald, his affiliated companies, and Sony Music Entertainment, the veracity of Kesha’s allegations were taken as a given. “On a motion to dismiss, the court must accept as true the facts alleged in the complaint, as well as all reasonable inferences that may be gleaned from those facts,” Kornreich explained.

Anyone who has read the vivid and unsettling complaint Kesha filed in October 2014 may find this outcome jarring. Kesha said that after Gottwald brought her into the music industry at a young age, he plied her with substances and then forced himself on her. It mentioned harsh insults about her body and her worthiness as a human. It said that he threatened to hurt her and her family. And it asked that the court see all of this and release her from her contract with him.

Why didn’t it work? The biggest thing seems to be statutes of limitations. “While Kesha’s [claim] alleges that she was sexually, physically and verbally abused by Gottwald for a decade, she describes only two specific instances of physical/sexual abuse,” Kornreich wrote. Those instances: In 2005, she says he forced her to snort drugs and get drunk before boarding an airplane where he made advances on her; in 2008, she says he gave her “sober pills” that turned out to be GHB, enabling what she believes was the rape of her unconscious body.

A few different laws might have been violated by these acts, but “whether the statute of limitations is … 5 years, 3 years, or 1 year, it expired at the latest in 2013,”  Kornreich wrote. Kesha’s side had cited a New York City ordinance saying that the statute of limitations on gender-motivated crimes was actually seven years, with a chance to extend the time period if the victim was so incapacitated by the violence that they couldn’t file a complaint within those seven years—a provision that kicked in, Kesha said, because of her having to go to rehab. Gottwald’s side said the longer statute of limitations was invalid because it conflicted with other laws. Kornreich declined to take a side on that issue, “as there are other reasons to dismiss the claim.”

One of those reasons include the very definition of “hate crime”: Kornreich did not see any evidence for Kesha’s claim that Gottwald committed any. Kesha’s filings “do not allege that Gottwald harbored animus toward women or was motivated by gender animus when he allegedly behaved violently toward Kesha,” she wrote. “Every rape is not a gender-motivated hate crime.” In a footnote, she added, “Gottwald is alleged to have made offensive remarks about Kesha’s weight, appearance, and talent, not about women in general.”

The definition of “intentional infliction of emotional distress” was also at issue. Kesha alleged that Luke emotionally abused her; Kornreich wrote that for such a charge to stick, “the conduct has been so outrageous in character, and so extreme in degree, as to go beyond all possible bounds of decency, and to be regarded as atrocious, and utterly intolerable in a civilized community.” But the statute of limitations on the most egregious alleged conduct—sexual assault—were up. The remaining conduct, the judge found, did not meet the standard for intentional infliction of emotional distress. Kesha’s “claims of insults about her value as an artist, her looks, and her weight are insufficient to constitute extreme, outrageous conduct intolerable in civilized society.”

Perhaps the most mind-bending aspect of Wednesday’s decision involves location. Kesha initially filed her claims against Gottwald in a California court and said all along that the abuse happened in California. But Gottwald’s side successfully requested that the case be moved to New York, citing a provision in Kesha’s record contract about selecting the venue where legal disputes related to that contract are heard. Once there, though, Luke’s side argued for dismissal of Kesha’s claims on the ground that they happened in California and therefore did not violate New York law. Kornreich agreed with this argument, which would seem to raise the question of how Kesha’s allegations could ever get full consideration in civil court if the defense can move the case away from where the abuse actually happened.

Reading through Kornreich’s ruling, you get the sense that she was not impressed by the work of Kesha’s lawyer Mark Geragos, lamenting the fact that there were not more dates or specifics about recent abuse by Gottwald. She also shot down some of his arguments saying that Gottwald’s legal maneuvers had voided Kesha’s contract. The dispute isn’t over: The California case may still move forward, and Kornreich’s dismissal can be appealed. But in either case, it seems likely that many of the obstacles cited by Kornreich would need to be surmounted in order for Kesha to get what she wants.