I"m not really sure about that...
In Utah you have to be found competent to stand trial.
You can read more about Brian David Mitchell and Wanda Barzee
Here:
http://en.wikipedia.org/wiki/Elizabeth_Smart_kidnapping
Brian David Mitchell (born October 18, 1953) and his wife Wanda Ileen Barzee
were indicted by a Utah grand jury. Mitchell's trial on these charges was
initially postponed following a court ruling that he was not mentally
competent to stand trial. U.S. District Court Judge Dale Kimball later
overturned this ruling; a trial date is pending.[28]
For several months, Mitchell and Barzee were held on US$10 million bond
awaiting the outcome of mental competency tests. Prosecutors said that
Mitchell and Barzee kidnapped Elizabeth to be Mitchell's "second wife",
[citation needed] held her against her will in the foothills near Arlington Hills
until October 8,[citation needed] and then took her to California, where they
stayed until March 5.[citation needed]
In January 2004, Barzee was found incompetent to stand trial on charges
including kidnapping, sexual assault, and burglary. On July 26, 2005, Mitchell
was also found incompetent to stand trial, facing the same charges. A
district judge has ordered him held until he is deemed fit for trial.[29][30]
Barzee's condition has not improved since she was found incompetent to
stand trial. Barzee has also refused to take medication "that might restore
her mental competence."[31]
Also see:
http://en.wikipedia.org/wiki/Competence_(law)
I believe now that Mitchell and Barzee have been found competent to stand
trial now... but I think that if they had not been found competent they
would have been able to use it as their defense.