Added checks that child relationships don't have a dam_id before processing them to prevent duplicates being added to the dam.