Precompute tab order so that reordering won't cause problems.