[xml-fold addon] Add findEnclosingTag utility