fix dont expect CHAINVARS in local_context, maybe it's only in global_context.