
An unwanted side-effect of the changes made in c6bdd136 to 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 before c6bdd136, however the call is now performed in a defensive manner falling back to getSingleton(…) when it fails. Closes gh-33830