When a tagged term no longer exists - don't iterate over it

#3125 

This patch will fix the problem when a user edit a node with a tagged term that no longer exists.