When viewing a tag on tag/index.php, a section is displayed showing "Users tagged with 'blah'". The profile pictures are meant to link to the user's profile IF the current user is allowed to view it.
However, the tag_print_user_box function will link the image to the tagged user's profile page only if the user has the moodle/user:viewdetails capability within that user's context.
There is an exception within the user/view.php page will allows a user's profile to be seen if they are a teacher within any course: isteacherinanycourse($user->id)
ie. all teacher profiles are browsable at a site level.
So the fix would be to check for isteacherinanycourse($user->id) within the tag_print_user_box function in tag/locallib.php. I've attached a patch which does this.