If an indictment is amended, a note of the order for amendment shall be endorsed on the indictment, and the indictment in its amended form shall be treated as the indictment for the purposes of the trial and for the purposes of all proceedings in relation to, or consequent on, the trial.