Changed GetRelatedDatasetByStrings to avoid dupe tables appearing

There where cases where the same table would appear over and over again
in the same JSON table matches, this was not okay :)