Buggy code:
class HostAdd extends AbstractAddStepHandler { static final HostAdd INSTANCE = new HostAdd ( ) ; private HostAdd ( ) { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { final PathAddress address = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ; final PathAddress parent = address . subAddress ( 0 , ( ( address . size ( ) ) - 1 ) ) ; final String name = address . getLastElement ( ) . getValue ( ) ; List < String > aliases = ALIAS . unwrap ( context , model ) ; final String serverName = parent . getLastElement ( ) . getValue ( ) ; final ServiceName virtualHostServiceName = UndertowService . virtualHostName ( serverName , name ) ; Host service = new Host ( name , ( aliases == null ? new LinkedList < String > ( ) : aliases ) ) ; <START_BUG> final ServiceBuilder < Host > builder = context . getServiceTarget ( ) . addService ( virtualHostServiceName , service ) . addDependency ( SERVER . append ( serverName ) , Server . class , service . getServer ( ) ) . addDependency ( UNDERTOW , UndertowService . class , service . getUndertowService ( ) ) . addAliases ( SERVICE_NAME . append ( name ) ) ; <END_BUG> if ( aliases != null ) { for ( String alias : aliases ) { builder . addAliases ( SERVICE_NAME . append ( alias ) ) ; } } builder . setInitialMode ( ACTIVE ) ; final ServiceController < Host > serviceController = builder . install ( ) ; final ServiceName consoleRedirectName = UndertowService . consoleRedirectServiceName ( serverName , name ) ; final ServiceController < ConsoleRedirectService > consoleServiceServiceController ; if ( ( context . getProcessType ( ) ) == ( ProcessType . STANDALONE_SERVER ) ) { final ConsoleRedirectService redirectService = new ConsoleRedirectService ( ) ; final ServiceBuilder < ConsoleRedirectService > redirectBuilder = context . getServiceTarget ( ) . addService ( consoleRedirectName , redirectService ) . addDependency ( UndertowHttpManagementService . SERVICE_NAME , HttpManagement . class , redirectService . getHttpManagementInjector ( ) ) . addDependency ( virtualHostServiceName , Host . class , redirectService . getHostInjector ( ) ) . setInitialMode ( PASSIVE ) ; consoleServiceServiceController = redirectBuilder . install ( ) ; } else { final ConsoleRedirectService redirectService = new ConsoleRedirectService ( ) ; final ServiceBuilder < ConsoleRedirectService > redirectBuilder = context . getServiceTarget ( ) . addService ( consoleRedirectName , redirectService ) . addDependency ( virtualHostServiceName , Host . class , redirectService . getHostInjector ( ) ) . setInitialMode ( PASSIVE ) ; consoleServiceServiceController = redirectBuilder . install ( ) ; } if ( newControllers != null ) { newControllers . add ( serviceController ) ; newControllers . add ( consoleServiceServiceController ) ; } } }

Fix:
final ServiceBuilder < Host > builder = context . getServiceTarget ( ) . addService ( virtualHostServiceName , service ) . addDependency ( SERVER . append ( serverName ) , Server . class , service . getServerInjection ( ) ) . addDependency ( UNDERTOW , UndertowService . class , service . getUndertowService ( ) ) . addAliases ( SERVICE_NAME . append ( name ) ) ;