STS-3411: additional performance improvements to reduce usage of type hierarchy engine and to make getBeansByContainingType more efficient