As I mentioned on SO, I made an error in the code above. It should not be get_permalink, but get_term_link.
According to your code $term_link is set outside of the example and after that not changed anymore, so it makes sense it stays the same.
If the site disappears, you made an error somewhere. It’s better to find the error than to redo everything.