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

Change-Id: I7d0bfc8d6438cf9da8b3f155defc4ed27caeb261