Sec. 11, Rule 119: When mistake has been made in charging the proper offense. — When it becomes manifest at any time before judgment, that a mistake has been made in charging the proper offense, and the accused cannot be convicted of the offense charged, or of any other offense necessarily included therein, the accused shall not be discharged, if there appears to be good cause to detain him. In such case, the court shall commit the accused to answer for the proper offense and dismiss the original case upon the filing of the proper information.