(b) Every rehearing shall take place before a court-martial composed of members not members of the court-martial which first heard the case. Upon such rehearing the accused shall not be tried for any offense of which he was found not guilty by the first court-martial, and no sentence in excess of or more severe than the original sentence may be imposed, unless the sentence is based upon a finding of guilty of an offense not considered upon the merits in the original proceedings, or unless the sentence prescribed for the offense is mandatory.