Fix a bug in the deletion of global containers