Eliminated all instanceof checks in matching of a ForestElement against
a ScopedSelection (in hope of speeding up the new tag computation).