title: thrust::exclusive_scan_by_key unexpected behavior
body: <pre><code>int data[ 10 ] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
  int keys[ 10 ] = { 1, 2, 1, 2, 1, 2, 1, 2, 1, 2 };
  thrust::exclusive_scan_by_key( keys, keys + 10, data, data );
  </code></pre>
  
  <p>By the examples at <a href="http://thrust.github.io/doc/group__segmentedprefixsums.html" rel="nofollow" title="Thrust Site">Thrust Site</a> I expected <code>0,0,1,1,2,2,3,3,4,4</code>, but got <code>0,0,0,0,0,0,0,0,0</code> instead; Is it bug, or is there somewhere something the defines this behavior?</p>
  
  <p>More importantly, assuming this is not a bug, is there a way to achieve this effect easily?</p>