Fix heap check.

Previously, we only checked the image we were patching. This did not
work if the referent was in another image. Fixed the DCHECK to check
all the boot images.

Bug: 28286961

(cherry picked from commit 488849c584337a1aae8413a1d1e0fad8043bf672)

Change-Id: If2e8e48b500935d0969e8673816d28218888bd13
2 files changed