When the defendant has been convicted or acquitted upon an indictment or information of an offense consisting of different degrees, the conviction or acquittal shall be a bar to another indictment or information for the offense charged in the former, or for any lower degree of that offense, or for an offense necessarily included therein.