As per the ACF documentation, you must pass either the term and term ID or the term object to the get_fields()
function for a taxonomy.
So in your case, you would replace $tag_image = get_field('tag_image');
with:
$tag_image = get_field('tag_image', $term);