A person acquitted upon the facts and merits on a former trial, may plead such acquittal in bar of a second prosecution for the same offense, notwithstanding any defect in the form or substance of the indictment or accusation on which he was acquitted, unless the case be for a violation of the law relating to the state revenue and the acquittal be reversed on a writ of error on behalf of the Commonwealth.
Code 1950, § 19.1-257; 1960, c. 366; 1975, c. 495.