Fix memoization arg checking.