diff --git a/C/cdmgr.c b/C/cdmgr.c index a837b3bf2..287c00c00 100644 --- a/C/cdmgr.c +++ b/C/cdmgr.c @@ -2919,6 +2919,8 @@ p_new_multifile(void) pe = RepPredProp(PredPropByFunc(Yap_MkFunctor(at, arity),mod)); LOCK(pe->PELock); pe->PredFlags |= MultiFileFlag; + if (pe->ModuleOfPred == PROLOG_MODULE) + pe->ModuleOfPred = TermProlog; if (!(pe->PredFlags & (DynamicPredFlag|LogUpdatePredFlag))) { /* static */ pe->PredFlags |= (SourcePredFlag|CompiledPredFlag);