rem: || env->mod_phase) {
add: || (env->mod_phase != env->phase)) {
context: Scheme_Object *scheme_check_accessible_in_module(Scheme_Env *env, Scheme_Object *prot_insp, Scheme_Object *in_modidx,						 Scheme_Object *symbol, Scheme_Object *stx,						 Scheme_Object *certs, Scheme_Object *unexp_insp,						 int position, int want_pos, int *_protected)     /* Returns the actual name when !want_pos, needed in case of	uninterned names.  Otherwise, returns a position value on success.	If position < -1, then merely checks for protected syntax.	Access for protected and unexported names depends on	certifictions in stx+certs, access implied by	{prot_,unexp_}insp, or access implied by in_modidx. For	unexported access, either stx+certs or unexp_insp must be	supplied (not both). For unprotected access, both prot_insp	and stx+certs should be supplied. */{  symbol = scheme_tl_id_sym(env, symbol, 0);  if ((env == scheme_initial_env)      || (env->module->primitive)      /* For now, we're pretending that all definitions exists for	 local phase 1 and up. */      || env->mod_phase) {    if (want_pos)      return scheme_make_integer(-1);    else      return symbol;  }  if (position >= 0) {    /* Check whether the symbol at `pos' matches the string part of       the expected symbol.  */    Scheme_Object *isym;    int need_cert = 0;    if (position < env->module->num_var_provides) {      if (SCHEME_FALSEP(env->module->provide_srcs[position]))	isym = env->module->provide_src_names[position];      else	isym = NULL;    } else {      int ipos = position - env->module->num_var_provides;      if (ipos < env->module->num_indirect_provides) {	isym = env->module->indirect_provides[ipos];	need_cert = 1;	if (_protected)	  *_protected = 1;      } else	isym = NULL;    }    if (isym) {      if (SAME_OBJ(isym, symbol)	  || (SCHEME_SYM_LEN(isym) == SCHEME_SYM_LEN(symbol)	      && !memcmp(SCHEME_SYM_VAL(isym), SCHEME_SYM_VAL(symbol), SCHEME_SYM_LEN(isym)))) {		if ((position < env->module->num_var_provides)	    && scheme_module_protected_wrt(env->insp, prot_insp)	    && env->module->provide_protects	    && env->module->provide_protects[position]) {	  if (_protected)	    *_protected = 1;	  check_certified(stx, certs, prot_insp, in_modidx, env, symbol, 1, 1);	}	if (need_cert)	  check_certified(stx, certs, unexp_insp, in_modidx, env, symbol, 1, 0);		if (want_pos)	  return scheme_make_integer(position);	else	  return isym;      }     }    /* failure */  } else {    Scheme_Object *pos;    pos = scheme_hash_get(env->module->accessible, symbol);    if (pos) {      if (position < -1) {	if (SCHEME_INT_VAL(pos) < 0)	  pos = scheme_make_integer(-SCHEME_INT_VAL(pos) - 1);	else	  pos = NULL;      } else {	if (SCHEME_INT_VAL(pos) < 0)	  pos = NULL;      }    }    if (pos) {      if ((SCHEME_INT_VAL(pos) < env->module->num_var_provides)	  && env->module->provide_protects	  && env->module->provide_protects[SCHEME_INT_VAL(pos)]) {	if (_protected)	  *_protected = 1;	check_certified(stx, certs, prot_insp, in_modidx, env, symbol, 1, 1);      }      if ((position >= -1) 	  && (SCHEME_INT_VAL(pos) >= env->module->num_var_provides)) {	/* unexported var -- need cert */	if (_protected)	  *_protected = 1;	check_certified(stx, certs, unexp_insp, in_modidx, env, symbol, 1, 0);      }      if (want_pos)	return pos;      else	return symbol;    }    if (position < -1) {      /* unexported syntax -- need cert */      check_certified(stx, certs, unexp_insp, in_modidx, env, symbol, 0, 0);      return NULL;    }  }  /* For error, if stx is no more specific than symbol, drop symbol. */  if (stx && SAME_OBJ(SCHEME_STX_SYM(stx), symbol)) {    symbol = stx;    stx = NULL;  }  scheme_wrong_syntax("compile", stx, symbol, 		      "variable not provided (directly or indirectly%s) from module: %S",		      (position >= 0) ? " and at the expected position" : "",		      env->module->modname);  return NULL;}