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

Change-Id: I32546aa6f7276a26b4e0419f83253110d83da01d