An unwanted side-effect of the changes made inc6bdd136to fix gh-7271 is that a mock produced by a factory bean is not reset. To allow such a mock to be reset without regressing the fix we now call getBean(…) as we did beforec6bdd136, however the call is now performed in a defensive manner falling back to getSingleton(…) when it fails. Closes gh-33830