Fixes boundary problem in indices conversion.
am: 45c9b56574

Change-Id: If1d11aa2bee2e24891296f1042648f0c145c47c8