I am not sure why id would be called twice - it is initialized only once.
Also, the id is just a unique identifier - we are not trying to ensure it is conserved, but the current code in PR is MT-unsafe w.r.t uniqueness requirement for id.