Provable wellorderings of formal theories for transfinitely iterated inductive definitions