Fix LT-15245 SFM duplicates some entries

* Changed the code to resolve links the same way with the
  first encountered item and the duplicate candidate
* Enhanced the test code to handle more SFM fields and to
  handle them more closely to real world mappings.

Change-Id: I4ee1e0d47c75bc51260a5d463f520a8073b2ee85