I'm not sure how the legal system in Ukraine works but for criminal charges you typically you need to prove intent. "Stupidity" would probably be a valid excuse in that case because it implies lack of intent, at least pertaining to the charge of betraying the country.