Rearrange sequence of rst header levels