Avoid circular references in StackContext and ExceptionStackContext.