Followup commit to 18e5e2fa1a. Needs the same treatment in the second pass when ID tags are reset again.
18e5e2fa1a