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

Change-Id: Ifde1ba7e3e17f3c05de200cde1d2bcf79a2940c2