Restoring consistency with AnnotationConfigApplicationContext. Issue: SPR-10852 (cherry picked from commit 01b8d93)
01b8d93