I never got the standard of whether someone knew it was wrong. It seems to me the standard really used is whether someone knew it was illegal, because trying to hide it is seen as proof that a person knew it was wrong. A truly crazy person could know it’s illegal and still think it’s justified because for whatever crazy reason that they actually believe.
Don’t care if they are legally insane or not; if determined to be legally insane put them down for the safety of the general public, they can’t be cured.
If determined to not be legally insane, put them down for murder.