Iterate over the values instead of duplicating the ids.