Discovery messages are keyed by uuid across all apps, so restoring a
message whose uuid is already taken silently dropped the message it
collided with, including one belonging to another app. Skip such a message
instead, and log it as it points at a corrupt backup.
The set of services which already have a message was also built once
before the loop, so a backup listing the same service twice ended up with
two messages for it. Only one of the two can ever be updated or removed
again, since send() and remove() match on app and service, while both are
handed to Home Assistant. Grow the set while restoring so that the first
message for a service wins.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>