Update auto id set. Allow rand for cases where hostid is common.
Update discovery for better attribute handling