Pass object to CopyContainer._get_id

This allows for more flexible id choosing logic.