Fix dependency of inventory copying.