Update `RegisteredBean` bean class detection to not consider singletons. Prior to this commit, any beans that had been instantiated could return the wrong class, especially if they were implemented using a lambda. See gh-28414
Update `RegisteredBean` bean class detection to not consider singletons. Prior to this commit, any beans that had been instantiated could return the wrong class, especially if they were implemented using a lambda. See gh-28414