Avoid issues in test-env when trying to unregister MBean, related to other change