Add a bounds check when getting indexed items in dexlayout.
am: 9a7f386ef0

Change-Id: Iee9610e20f3b9aaef1b4d8164ec54f1cb8e9fd16