"It seems that the next logical step is to assert that his continued detention is illegal, and that's he's got a right to be charged or discharged," Emmert said. He said habeas petitions can likely be filed on a defendant's behalf even if he's incompetent to stand trial.