We've all been dancing around the basic issue: does Data have a soul? I don't know that he has. I don't know that I have! But I have got to give him the freedom to explore that question himself. It is the ruling of this court that Lieutenant Commander Data has the freedom to choose."
The relevant is in bold.
Louvois is a trained JAG and Janeway does whatever hell she wants without regards to any laws.
What really bothered me is that Janeway never gave the Doctor more time to find a way to keep Tuvix while bringing back Neelix and Tuvok. What was with the rush? Don't they owe him that before condemning him to death?