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

#3125

This is a PR against the 3.6 branch.