There are more places where we need to create a beanName for an inner bean definition so rather than copy/pasting those, it would be better to have that logic in a single place.

Comment From: snicoll

I was under the impression I could add that in BeanFactoryUtils but this introduces a package tangle. @jhoeller any idea?

Comment From: snicoll

It turns out that the way a RootBeanDefinition for an inner bean is required and it goes beyons getting a bean name for it. I've updated the issue accordingly.