Ex Parte Bollman & Swartwout (1807) and Hamdi v. Rumsfeld (2004) say otherwise. Live with it.
obiter dictum (Latin "something said in passing") A judicial statment made during the course of delivering a judicila opinion, but one that is unnecessary to the decision in the case and therefore not precedential (though it may be considered persuasive). - Often shortened to dictum, or, less commonly, obiter.
Ex parte Bollman & Swartout - "The Supreme court discharged the prisoners, confederates in Aaron Burr's conspiracy, from an indictment for treason. The indictment specified their treason as levying war against the United States. chief Justice John Marshall, for the Court, distinguished treason from a conspiracy to commit it. he sought to prevent the crime of treason from being 'extended by construction to doubtful cases.' To complete the crime of treason or levying war, Marshall said, a body of men must be 'actually assembled for the purpose of effecting by force a treasonable purpose,' in which everyone involved, to any degree and however remote from the scene of the action, is guilty of treason. But the levying of war does not exist short of the actual assemblage of armed men. Congress had the power to punish crimes short of treason, but hte constitution protected Americans froma charge of treason for a crime short of it."
Leonard Levy in Encyclopedia of the American Constitution
Bollman was not about habeas corpus, it was about conspiracy to commit treason. Marshall's paasing commnet with regard to habeas are obiter dicta, and as you can see from the definition provided, are "not precedential."
The same can be said for Hamdi.