Check for stale memo

Use a weak reference to the original context, so that changes
to the context can be determined, whilst still allowing GC of
the MatcherContext.