DefaultListableBeanFactory only puts 'cache-safe' Class keys into its by-type cache

Issue: SPR-11520