fixed #5120 - fixed migration for discovered hosts

Quick in-place fix.