code: private void popUIComponentClassicTagBase() {
          List list = (List) context.getAttributes().get(COMPONENT_TAG_STACK_ATTR);
  
          // if an exception occurred in a nested  tag,
          //there could be a few tags left in the stack.
          UIComponentClassicTagBase uic = null;
          while (list != null && uic != this) {
              int idx = list.size() - 1;
              uic = (UIComponentClassicTagBase) list.get(idx);
              list.remove(idx);
              if (idx < 1) {
                  context.getAttributes().remove(COMPONENT_TAG_STACK_ATTR);
                  list = null;
              }
          }
      }
docs: <p>Pop the top {@link UIComponentTag} instance off of our component tag
  stack, deleting the stack if this was the last entry.</p>