Is it possible to memoize a recursive function without redefining it?

Ok, so… I feel like I just twisted my brain into a shape right out of an M.C. Escher drawing, but I managed to make this:

It’s ridiculously fragile but it seems to work for functions that meet the restrictions.