Fixes mismatch between Java and C++ indices.
am: 47c9e5861f

Change-Id: I418e76ea0041df6a65c6e635737fdbb0743c0915