fixed automatic memoization bug (whole part of the contexts are now used as the memo key)