getTagScope() gets the nearest tag scope to this node by
traversing up the parent hierarchy until one is found. If none is found, null is
returned.
Returns
A TagScope object which represents the nearest tag scope, or null if one is not found.