ART: Use memoization for type id table check am: 5254d6f23d
am: fcb61db732

Change-Id: I1c871349ddda4efb24ba95c1c95b8a85025bd9d0