As a follow-up of #27821, there are a number of places where we're using generic bean definition where we should be using root bean definition.