If the Magistrate or Court finds reason to believe that the accused committed an act, while he was of unsound mind, which, but for such unsoundness, would be an offence, the Magistrate should proceed with the case. ...