In the process of #35373, a cacheable decision needs to be made within an injected Provider instance, taking the autowiredBeanNames into account. This turned out to require fine-tuned handling for 0 or 2+ autowired beans which needs to be aligned in ContextAnnotationAutowireCandidateResolver since such scenarios may appear in a @Lazy proxy as well (even if the regular case is a single target bean there).