docs: public Object withBuilder(FactoryBuilderSupport builder, Closure closure) {
          if (builder == null || closure == null) {
              return null;
          }
  
          Object result = null;
          Object previousContext = getProxyBuilder().getContext();
          FactoryBuilderSupport previousProxyBuilder = localProxyBuilder.get();
          try {
              localProxyBuilder.set(builder);
              closure.setDelegate(builder);
              result = closure.call();
          }
          catch (RuntimeException e) {
              // remove contexts created after we started
              localProxyBuilder.set(previousProxyBuilder);
              if (getProxyBuilder().getContexts().contains(previousContext)) {
                  Map<String, Object> context = getProxyBuilder().getContext();
                  while (context != null && context != previousContext) {
                      getProxyBuilder().popContext();
                      context = getProxyBuilder().getContext();
                  }
              }
              throw e;
          }
          finally {
              localProxyBuilder.set(previousProxyBuilder);
          }
  
          return result;
      }