Merge "Fix two IndexOutOfBoundsException crashes." into oc-dev
am: ded5608f18

Change-Id: I925c6875249e15d2a497b619aba3d05d3644580e