There has been oil flowing through the Dakota Access pipeline for more than two months now. The protest camps have been bulldozed and the toxic garbage piles left behind by the protesters have largely been cleaned up. After years of wrangling with the Obama administration through endless court challenges, the final approvals were received and the business of getting energy products to market is underway.

So with all that in mind, how is it that a federal judge has just ruled in favor of the Standing Rock tribe and against the developers of the pipeline? (The Atlantic)

A federal judge ruled in favor of the Standing Rock Sioux Tribe on Wednesday, handing the tribe its first legal victory in its year-long battle against the Dakota Access pipeline.

James Boasberg, who sits on D.C. district court, said that the U.S. Army Corps of Engineers failed to perform an adequate study of the pipeline’s environmental consequences when it first approved its construction. In a 91-page decision, the judge cited the Corps’ study of “the impacts of an oil spill on fishing rights, hunting rights, or environmental justice” as particularly deficient, and he ordered it to prepare a new report on its risks.

The court did not, however, order the pipeline to be shut off until a new environmental study is completed—a common remedy when a federal permit is found lacking. Instead, Boasberg asked attorneys to appear before him again and make a new set of arguments about whether the pipeline should operate.

On the one hand, this is a rather pointless victory for the tribe… at least for the moment. If the judge doesn’t order the pipeline to be shut down then nothing has been accomplished other than yet another round of administrative reviews and business continues as usual. But Boasberg clearly left the door open to the possibility of a shutdown by entertaining new arguments on that point.

That brings us to a rather uncomfortable legal question. The plaintiffs in this case were fighting against the federal government this entire time. It was Washington which was responsible for approving the plans, giving a thumbs up to the environmental impact studies and signing off on the permits. The tedious court process played out for the whole nine yards and the government eventually made the decision to allow the work to move forward to completion. And the judge in this case is part of the federal government. (Albeit a different branch.)

Let’s just say for the sake of argument that this judge finds that the environmental study was insufficient and that the pipeline should be shut down. The owners of the pipeline will immediately begin losing money hand over fist. If the same government that told them to go ahead now turns around and puts a stranglehold on their supply chain, do they have a court case of their own to claim damages? After all, they played by the rules and did precisely as they were told each step of the way. If Uncle Sam turns around now and says that the installation is flawed isn’t the government equally culpable for any losses they incur?

I don’t know the answer to that question, but I have a sneaking suspicion that we may be about to find out.