The invalid inference to make about this excerpt is: "Only someone who was medically qualified could declare someone mentally insane."
The text describes how Bly was declared insane by a judge, not a medical professional, indicating that it wasn't strictly necessary for a medically qualified individual to make such a determination.