Fix a bug where the locally created items were not linked to the associated container.