title: can't set ALTREP truelength
body: <p>I have some code that worked normally untill I updated to R 4.0.2.</p>
  <pre><code>colnames &lt;- c(&quot;Wind&quot;)
  type &lt;- &quot;Month&quot;
  temp &lt;- setDT(airquality)[, lapply(.SD, sum), keyby = Month, .SDcols = colnames]
  colnames_new &lt;- paste0(colnames, &quot;_&quot;, type)
  setnames(temp, c(&quot;Month&quot;, colnames_new))
  setDT(airquality)[, (colnames_new) := temp[i = airquality[, .(Month)], j = -1, on = &quot;Month&quot;]]
  </code></pre>
  <p>Now I get the error:</p>
  <blockquote>
  <p>Error in .shallow(x, cols = cols, retain.key = TRUE) :    can't set
  ALTREP truelength</p>
  </blockquote>
  <p>I use data.table 1.13.0. Does anyone have the same problem?</p>