STS-3172: performance improvements for BeansCoreUtils.isBeansConfig (heavily used in builds)