title: copy a list of data.tables
body: <p>I have the following situation:</p>
  
  <p>1) a list of data tables</p>
  
  <p>2) For testing purposes I <em>deliberately</em> want to (deeply) copy the whole list including the data tables</p>
  
  <p>3) I want to take some element from the copied list and add a new column.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>library(data.table)
  x = data.table(aaa = c(1,2))
  y = data.table(bbb = c(1,2))
  z = list(x,y)
  zz = copy(z)
  
  v = zz[[1]]
  v = v[, newColumn := 1]
  </code></pre>
  
  <p>Now Im getting the following error:</p>
  
  <pre><code>Error in `[.data.table`(res, , `:=`(xxx, TRUE)) : 
  (converted from warning) Invalid .internal.selfref detected and fixed
  by taking a copy of the whole table so that := can add this new column 
  by reference. At an earlier point, this data.table has been copied by R 
  (or been created manually using structure() or similar). Avoid key&lt;-, 
  names&lt;- and attr&lt;- which in R currently (and oddly) may copy the whole 
  data.table. Use set* syntax instead to avoid copying: ?set, ?setnames 
  and ?setattr. Also, in R&lt;=v3.0.2, list(DT1,DT2) copied the entire DT1 
  and DT2 (R's list() used to copy named objects); please upgrade to 
  R&gt;v3.0.2 if that is biting. If this message doesn't help, please report 
  to datatable-help so the root cause can be fixed.
  </code></pre>
  
  <p>I dont understand precisely how the copy calls are handled by R and how they are passed to data.table but isnt it like so: (?)</p>
  
  <p>If someone explicitely uses the copy function then he/she is aware of the fact that there exists a difference between 'by-value' and 'by-reference'. So he/she should be handed out the true copy of the object.</p>
  
  <p>Hence, I am of the opinion that there should not be any error and I consider it as a 'bug' that the error occurs nonetheless. Is that correct?</p>
  
  <p>FW</p>