Fixes #4490: Have unique ID for new machine inventories