title: D3: can create a subset of elements, but not update them
body: <p>I have a dataset, one element of which is another dataset (let's call it "dataset2"), of a variable length.</p>
  
  <p>I create a complex plot:</p>
  
  <pre><code>var group = svg.selectAll('g').data(dataset)
  var groupEnter = group.enter().append('g')
  
  /* Add new elements */  
  groupEnter.append('line')  
      ...  
  groupEnter.append('polygon')  
      ...  
  groupEnter.append('text')  
      ...  
  
  /* Update elements */
  group.select('line')  
      ...  
  group.select('polygon')  
      ...  
  group.select('text')  
      ...  
  </code></pre>
  
  <p>So far so good.</p>
  
  <p>Now, I want to add polygons representing "dataset2":</p>
  
  <pre><code>var subGroup = group.selectAll('.someClass').data(function(d) { return d['dataset2'] })
  
  var subGroupEnter = subGroup.enter().append('polygon')
      .attr('class', 'someClass')
      ...
  </code></pre>
  
  <p>This seems to work; polygons are created.</p>
  
  <p>However, I can't update them:</p>
  
  <pre><code>subGroup.selectAll('.someClass')
      ...
  </code></pre>
  
  <p>This has no effect.</p>
  
  <p>If I ran</p>
  
  <pre><code>subGroup.selectAll('.someClass')
      .attr('...', function(d) { console.log(d); return ... })
  </code></pre>
  
  <p>there is no output.</p>
  
  <p>What am I doing wrong?</p>