Whenever 2 or more persons shall be included in the same indictment and it shall appear that there is not sufficient evidence to put any defendant on his defense, it shall be the duty of the court to order such defendant to be discharged from such indictment, before the evidence shall be deemed to be closed.