Buggy code:
public class EntityBeanHomeViewConfigurator implements ViewConfigurator { @ Override public void configure ( final DeploymentPhaseContext context , final ComponentConfiguration componentConfiguration , final ViewDescription description , final ViewConfiguration configuration ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = context . getDeploymentUnit ( ) ; final DeploymentReflectionIndex deploymentReflectionIndex = deploymentUnit . getAttachment ( REFLECTION_INDEX ) ; configuration . addClientPostConstructInterceptor ( Interceptors . getTerminalInterceptorFactory ( ) , TERMINAL_INTERCEPTOR ) ; configuration . addClientPreDestroyInterceptor ( Interceptors . getTerminalInterceptorFactory ( ) , InterceptorOrder . ClientPreDestroy . TERMINAL_INTERCEPTOR ) ; final boolean localHome = ( EjbHomeViewDescription . class . cast ( description ) . getMethodIntf ( ) ) == ( MethodIntf . LOCAL_HOME ) ; final EntityBeanComponentDescription componentDescription = ( ( EntityBeanComponentDescription ) ( componentConfiguration . getComponentDescription ( ) ) ) ; final EJBViewDescription createdView = ( localHome ) ? componentDescription . getEjbLocalView ( ) : componentDescription . getEjbRemoteView ( ) ; final DeploymentClassIndex classIndex = deploymentUnit . getAttachment ( CLASS_INDEX ) ; for ( final Method method : configuration . getProxyFactory ( ) . getCachedMethods ( ) ) { configuration . addClientInterceptor ( method , CLIENT_DISPATCHER_INTERCEPTOR_FACTORY , CLIENT_DISPATCHER ) ; if ( ( ( method . getName ( ) . equals ( "equals" ) ) && ( ( method . getParameterTypes ( ) . length ) == 1 ) ) && ( ( method . getParameterTypes ( ) [ 0 ] ) == ( Object . class ) ) ) { configuration . addClientInterceptor ( method , INSTANCE , EJB_EQUALS_HASHCODE ) ; } else if ( ( method . getName ( ) . equals ( "hashCode" ) ) && ( ( method . getParameterTypes ( ) . length ) == 0 ) ) { configuration . addClientInterceptor ( method , INSTANCE , EJB_EQUALS_HASHCODE ) ; } else if ( ( method . getName ( ) . equals ( "toString" ) ) && ( ( method . getParameterTypes ( ) . length ) == 0 ) ) { } else if ( method . getName ( ) . startsWith ( "create" ) ) { final Method ejbCreate = resolveEjbMethod ( "create" , "ejbCreate" , componentDescription . getPrimaryKeyType ( ) , componentConfiguration . getComponentClass ( ) , deploymentReflectionIndex , method , componentConfiguration . getComponentName ( ) ) ; final Method ejbPostCreate = resolveEjbMethod ( "create" , "ejbPostCreate" , void . class . getName ( ) , componentConfiguration . getComponentClass ( ) , deploymentReflectionIndex , method , componentConfiguration . getComponentName ( ) ) ; final EntityBeanHomeCreateInterceptorFactory factory = new EntityBeanHomeCreateInterceptorFactory ( ejbCreate , ejbPostCreate ) ; componentConfiguration . getStartDependencies ( ) . add ( new org . jboss . as . ee . component . DependencyConfigurator < ComponentStartService > ( ) { @ Override public void configureDependency ( final ServiceBuilder < ? > serviceBuilder , final ComponentStartService service ) throws DeploymentUnitProcessingException { serviceBuilder . addDependency ( createdView . getServiceName ( ) , ComponentView . class , factory . getViewToCreate ( ) ) ; } } ) ; configuration . addViewInterceptor ( method , factory , HOME_METHOD_INTERCEPTOR ) ; } else if ( method . getName ( ) . startsWith ( "find" ) ) { final Method ejbFind = resolveEjbFinderMethod ( componentConfiguration . getComponentClass ( ) , deploymentReflectionIndex , method , componentConfiguration . getComponentName ( ) , componentDescription . getPersistenceType ( ) ) ; final EntityBeanHomeFinderInterceptorFactory interceptorFactory = createHomeFindInterceptorFactory ( ejbFind , localHome ) ; componentConfiguration . getStartDependencies ( ) . add ( new org . jboss . as . ee . component . DependencyConfigurator < ComponentStartService > ( ) { @ Override public void configureDependency ( final ServiceBuilder < ? > serviceBuilder , final ComponentStartService service ) throws DeploymentUnitProcessingException { serviceBuilder . addDependency ( createdView . getServiceName ( ) , ComponentView . class , interceptorFactory . getViewToCreate ( ) ) ; } } ) ; configuration . addViewInterceptor ( method , interceptorFactory , COMPONENT_DISPATCHER ) ; } else if ( ( ( method . getName ( ) . equals ( "remove" ) ) && ( ( method . getParameterTypes ( ) . length ) == 1 ) ) && ( ( method . getParameterTypes ( ) [ 0 ] ) == ( Object . class ) ) ) { <START_BUG> configuration . addViewInterceptor ( method , new EntityBeanHomeRemoveInterceptorFactory ( ( ! localHome ) ) , COMPONENT_DISPATCHER ) ; <END_BUG> } else if ( ( ( method . getName ( ) . equals ( "remove" ) ) && ( ( method . getParameterTypes ( ) . length ) == 1 ) ) && ( ( method . getParameterTypes ( ) [ 0 ] ) == ( Handle . class ) ) ) { configuration . addViewInterceptor ( method , EntityBeanHomeRemoveByHandleInterceptorFactory . INSTANCE , COMPONENT_DISPATCHER ) ; } else if ( ( method . getName ( ) . equals ( "getEJBMetaData" ) ) && ( ( method . getParameterTypes ( ) . length ) == 0 ) ) { final Class < ? > ejbObjectClass ; final Class < ? > pkClass ; try { ejbObjectClass = classIndex . classIndex ( createdView . getViewClassName ( ) ) . getModuleClass ( ) ; pkClass = classIndex . classIndex ( componentDescription . getPrimaryKeyType ( ) ) . getModuleClass ( ) ; } catch ( ClassNotFoundException e ) { throw new DeploymentUnitProcessingException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>load<seq2seq4repair_space>view<seq2seq4repair_space>class<seq2seq4repair_space>for<seq2seq4repair_space>" + ( componentDescription . getComponentName ( ) ) ) , e ) ; } final EjbMetadataInterceptorFactory factory = new EjbMetadataInterceptorFactory ( ejbObjectClass , configuration . getViewClass ( ) , pkClass , false , false ) ; componentConfiguration . getStartDependencies ( ) . add ( new org . jboss . as . ee . component . DependencyConfigurator < ComponentStartService > ( ) { @ Override public void configureDependency ( final ServiceBuilder < ? > serviceBuilder , final ComponentStartService service ) throws DeploymentUnitProcessingException { serviceBuilder . addDependency ( configuration . getViewServiceName ( ) , ComponentView . class , factory . getHomeView ( ) ) ; } } ) ; configuration . addViewInterceptor ( method , factory , HOME_METHOD_INTERCEPTOR ) ; }

Fix:
configuration . addViewInterceptor ( method , EntityBeanHomeRemoveInterceptorFactory . instance ( ( ! localHome ) ) , COMPONENT_DISPATCHER ) ;