Prevent duplicate TaggedItem elements via add_tags function