ClassMetadata: Moved the duplicate indexes check and update code to a separate method.
Merge branch 'indexed_ref_one'