title: Sorting a selection in d3.js disturbs the data-join
body: <p>When I reorder a selection of paths in d3 with selection.sort(), the data-join is disturbed and my paths get reassigned to the wrong data objects.</p>
  
  <p>I only want to reorder the paths so that some end up on top of others (as in z-index). I do not want to reassign data objects from one path to another. </p>
  
  <p>How can I reorder the paths without disturbing the data-join?</p>
  
  <pre><code>_friends.selectAll('path').sort(function(a, b){
    return d3.ascending(a.Q, b.Q);
  });
  </code></pre>