How to fix the «Item (Magento\CatalogInventory\Model\Stock\Status\Interceptor) with the same ID already exists» Magento 2.2 bug?

The bug is propduced by the new Magento_CatalogInventoryConfigurableProduct module.