Better fix for ERRAI-482 that does not rely on @AfterInitialization