Internal ids: Fix regression with multiple IID scopes
What does this MR do?
Fix regression for models with multiple iid scopes
For models with multiple iid scopes (Milestone), the flag
@internal_id_needs_tracking
should only be reset if the tracking was
actually done.
This has been introduced by the refactoring in !18003 (merged), but did not have an effect because the problem was hidden behind a feature flag (see comments).