Merge "Remove the redundant index computation in the first pass"