Use taxonomy_get_term_by_name when there are duplicate names across multiple taxonomy categories
Yes, you should pull the term ID directly from the field value rather than first rendering it to a term name, then trying to look up the term based on the name.