Memoization can lead to nasty surprises