Memoization tests that also now cover one more line of code.
Updated from master