docs: private ObjectInstance checkNotAReservedDomainRegistrationIfObjectNameWasChanged(ObjectName name, ObjectInstance createdInstance, MBeanServerPlugin usedDelegate) throws RuntimeOperationsException {
          ObjectName registeredName = createdInstance.getObjectName();
          if (registeredName.equals(name) || usedDelegate != rootMBeanServer) {
              //MBeanRegistration.preRegister() did not change the name or we did not end up in the root MBeanServer (which should have been handled by the current delegates)
              return createdInstance;
          }
  
          //Find the MBeanServerPlugin delegate which should have been used for the registered delegate
          MBeanServerPlugin shouldHaveUsedDelegate = null;
          for (MBeanServerPlugin delegate : delegates) {
              if (delegate.accepts(registeredName)) {
                  shouldHaveUsedDelegate = delegate;
              }
          }
  
          if (shouldHaveUsedDelegate != null) {
              //We have a MBeanServer delegate which should have been used for registeredName's domain.
              //We want to throw the badDomainInCalclulatedObjectNameException, but first we want to clean up the
              //MBean registered in the rootMBeanServer, which should never have made it there
              try {
                  //Attempt to unregister
                  usedDelegate.unregisterMBean(registeredName);
              } catch (InstanceNotFoundException e) {
                  //The MBean we want to unregister could not be found. Someone else must have unregistered it, but who cares. The
                  //end result is that the MBean we want to get rid of does not exist, which is what we want.
              } catch (MBeanRegistrationException e) {
                  //The only reason this would happen is a problem in a custom MBeanRegistration.preDeRegister() method.
                  //This could perhaps be handled better but there isn't really a lot we can do apart from log an error.
                  JmxLogger.ROOT_LOGGER.errorUnregisteringMBeanWithBadCalculatedName(e, registeredName);
              } catch (RuntimeException e) {
                  //No idea why this would happen?
                  //This could perhaps be handled better but there isn't really a lot we can do apart from log an error.
                  JmxLogger.ROOT_LOGGER.errorUnregisteringMBeanWithBadCalculatedName(e, registeredName);
              }
              throw JmxLogger.ROOT_LOGGER.badDomainInCalclulatedObjectNameException(registeredName);
          }
  
          return createdInstance;
      }