Add a bounds check when getting indexed items in dexlayout.

Will be useful to help diagnose issues caused by a corrupted dex file.

Bug: 62515426
Test: mm test-art-host

(cherry picked from commit 9804e9ee90a3e6da05cbfe602deb29fb79a82f50)

Change-Id: I0ca01a13c7fdcf2c0230331299ce675b955fca4d
2 files changed