Fix duplicate classes check to iterate over classes properly.

Previously would iterate in class index order, but classes are not
organized alphabetically. This changes the check to iterate over the
classes's type indexes, which are in alphabetical order.

Unit test to come.

Bug: 35477728
Test: mm test-art-host
Change-Id: Iddaad84c30be042d09dde56c998221fd07f04ab6
1 file changed