Buggy code:
public class ManagedBeanAnnotationProcessor implements DeploymentUnitProcessor { static final DotName MANAGED_BEAN_ANNOTATION_NAME = DotName . createSimple ( ManagedBean . class . getName ( ) ) ; public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final EEResourceReferenceProcessorRegistry registry = deploymentUnit . getAttachment ( RESOURCE_REFERENCE_PROCESSOR_REGISTRY ) ; final EEModuleDescription moduleDescription = deploymentUnit . getAttachment ( EE_MODULE_DESCRIPTION ) ; final EEApplicationClasses applicationClasses = deploymentUnit . getAttachment ( EE_APPLICATION_CLASSES_DESCRIPTION ) ; final CompositeIndex compositeIndex = deploymentUnit . getAttachment ( COMPOSITE_ANNOTATION_INDEX ) ; if ( compositeIndex == null ) { return ; } final List < AnnotationInstance > instances = compositeIndex . getAnnotations ( ManagedBeanAnnotationProcessor . MANAGED_BEAN_ANNOTATION_NAME ) ; if ( ( instances == null ) || ( instances . isEmpty ( ) ) ) { return ; } for ( AnnotationInstance instance : instances ) { AnnotationTarget target = instance . target ( ) ; if ( ! ( target instanceof ClassInfo ) ) { throw EeMessages . MESSAGES . classOnlyAnnotation ( "@ManagedBean" , target ) ; } final ClassInfo classInfo = ( ( ClassInfo ) ( target ) ) ; if ( ! ( ManagedBeanAnnotationProcessor . assertManagedBeanClassValidity ( classInfo ) ) ) { continue ; } final String beanClassName = classInfo . name ( ) . toString ( ) ; final AnnotationValue nameValue = instance . value ( ) ; final String beanName = ( ( nameValue == null ) || ( nameValue . asString ( ) . isEmpty ( ) ) ) ? beanClassName : nameValue . asString ( ) ; final ComponentDescription componentDescription = new ComponentDescription ( beanName , beanClassName , moduleDescription , deploymentUnit . getServiceName ( ) ) ; ViewDescription viewDescription = new ViewDescription ( componentDescription , beanClassName ) ; viewDescription . getConfigurators ( ) . addFirst ( new ViewConfigurator ( ) { public void configure ( final DeploymentPhaseContext context , final ComponentConfiguration componentConfiguration , final ViewDescription description , final ViewConfiguration configuration ) throws DeploymentUnitProcessingException { final Object contextKey = new Object ( ) ; configuration . addClientPostConstructInterceptor ( new ManagedBeanCreateInterceptorFactory ( contextKey ) , INSTANCE_CREATE ) ; final ManagedBeanAssociatingInterceptorFactory associatingInterceptorFactory = new ManagedBeanAssociatingInterceptorFactory ( contextKey ) ; configuration . addClientInterceptor ( associatingInterceptorFactory , ASSOCIATING_INTERCEPTOR ) ; configuration . addClientPreDestroyInterceptor ( new ManagedBeanDestroyInterceptorFactory ( contextKey ) , INSTANCE_DESTROY ) ; <START_BUG> configuration . addViewInterceptor ( new ImmediateInterceptorFactory ( new org . jboss . as . ee . component . TCCLInterceptor ( componentConfiguration . getModuleClassLoder ( ) ) ) , TCCL_INTERCEPTOR ) ; <END_BUG> } } ) ; viewDescription . getBindingNames ( ) . addAll ( Arrays . asList ( ( "java:module//" + beanName ) , ( ( ( "java:app//" + ( moduleDescription . getModuleName ( ) ) ) + "//" ) + beanName ) ) ) ; componentDescription . getViews ( ) . add ( viewDescription ) ; moduleDescription . addComponent ( componentDescription ) ; registry . registerResourceReferenceProcessor ( new ManagedBeanResourceReferenceProcessor ( beanClassName ) ) ; } } public void undeploy ( DeploymentUnit context ) { } private static boolean assertManagedBeanClassValidity ( final ClassInfo managedBeanClass ) { } }

Fix:
configuration . addViewInterceptor ( new ImmediateInterceptorFactory ( new org . jboss . as . ee . component . TCCLInterceptor ( componentConfiguration . getModuleClassLoader ( ) ) ) , TCCL_INTERCEPTOR ) ;