docs: static boolean scrubContents(ContextNode node) {
          boolean emptied = true;
          Iterator<Entry<String, Object>> entries = node.children.entrySet().iterator();
          while (entries.hasNext()) {
              Entry<String, Object> entry = entries.next();
              Object child = entry.getValue();
              if (child instanceof AutoBindNode) {
                  emptied = false;
              } else if (child instanceof ServiceRegistration) {
                  ServiceRegistration<?> reg = (ServiceRegistration<?>) child;
                  unregister(reg);
                  entries.remove();
              } else if (child instanceof ContextNode) {
                  ContextNode childNode = (ContextNode) child;
                  if (scrubContents(childNode))
                      // if it was emptied, remove the node
                      // TODO - potential race condition here - need to prevent any additions during clean
                      entries.remove();
                  else
                      // if it wasn't emptied we need to keep its parent too
                      emptied = false;
              } else {
                  // there shouldn't be any other types of object in there!
                  if (tc.isDebugEnabled())
                      Tr.debug(tc, "Unexpected object type found in internal tree", node.fullName + WSName.SEPARATOR + entry.getKey(), child);
                  // remove it anyway
                  entries.remove();
              }
          }
          return emptied;
      }