Fix memoization implementation error in class methods

The bug didn't modify the public behaviour of the gem,
but did create bunches of instances of EntityManager and
FallbackAuthenticationHandler without necessity. Anyway,
the code didn't do was it was intended to.

I should have written those tests back in:
55d34d4d5c0bf977b51b853aaa73307dcd40413a