                 Offset num_segments = next_tile_segment_idx - block_segment_idx;
                 StoreStriped<BLOCK_THREADS>(threadIdx.x, d_output + block_segment_idx, segment_reductions, num_segments);
             }
-            else
+*/            else
             {
                 // Merge the tile's segment and value indices
 
-                // Get thread begin-indices
-                Offset thread_segment_idx    = temp_storage.thread_segment_idx[threadIdx.x];
-                Offset thread_value_idx      = temp_storage.thread_value_idx[threadIdx.x];
-
+                // Get thread begin-index for segments
+                Offset thread_segment_idx = (threadIdx.x == 0) ?
+                    block_segment_idx :                             // First thread starts at the block's start
+                    temp_storage.thread_segment_idx[threadIdx.x];   // Other threads start at their predecessor's end
+
+                // Get thread begin-index for values
+                Offset thread_value_idx = (threadIdx.x == 0) ?
+                    block_value_idx :                               // First thread starts at the block's start
+                    temp_storage.thread_value_idx[threadIdx.x];     // Other threads start at their predecessor's end
+/*
+                CubLog("\t thread segment idx %d:%d, value idx %d:%d\n",
+                    thread_segment_idx, next_thread_segment_idx,
+                    thread_value_idx, next_thread_value_idx);
+*/
                 // Barrier for smem reuse
                 __syncthreads();
 

    CubDebugExit(g_allocator.DeviceAllocate((void**)&d_values, sizeof(Value) * num_values));
    CubDebugExit(g_allocator.DeviceAllocate((void**)&d_segment_offsets, sizeof(Offset) * (num_segments + 1)));
    CubDebugExit(g_allocator.DeviceAllocate((void**)&d_output, sizeof(Value) * num_segments));

    // Request and allocate temporary storage
    void    *d_temp_storage = NULL;

        // ReduceRegionByKeyPolicy
        typedef BlockSegReduceRegionByKeyPolicy<
                256,                            ///< Threads per thread block
                9,                             ///< Items per thread (per tile of input)
                BLOCK_LOAD_DIRECT,              ///< The BlockLoad algorithm to use
                false,                          ///< Whether or not only one warp's worth of shared memory should be allocated and time-sliced among block-warps during any load-related data transpositions (versus each warp having its own storage)
                LOAD_LDG,                       ///< Cache load modifier for reading input elements
