Fixes #3887: Correctly handle machine inventory not in the same branch than the node one