Index: Compiler/FrontEnd/Static.mo
===================================================================
--- Compiler/FrontEnd/Static.mo	(revision None)
+++ Compiler/FrontEnd/Static.mo	(revision None)
@@ -7159,4 +7159,8 @@
     case (cache,env,fn,args,nargs,impl,_,st,pre,_)
       equation
+        
+        // For unrolling errors if an overloaded 'constructor' matches later.
+        ErrorExt.setCheckpoint("RecordConstructor");
+        
         (cache,
          t as DAE.T_FUNCTION(
@@ -7217,4 +7221,7 @@
         (cache,status) = instantiateDaeFunction(cache,recordEnv,fn,false/*record constructor never builtin*/,SOME(recordCl),true);
         expProps = Util.if_(Util.isSuccess(status),SOME((call_exp,prop_1)),NONE());
+        
+        ErrorExt.rollBack("RecordConstructor");
+        
       then
         (cache,expProps);
@@ -7242,4 +7249,6 @@
         (cache,expProps) = elabCallArgs3(cache,env,typelist,fn_1,args,nargs,impl,st,pre,info); 
         
+        ErrorExt.rollBack("RecordConstructor");
+        
       then
         (cache,expProps);
@@ -7249,4 +7258,5 @@
       equation
         true = Config.acceptMetaModelicaGrammar();
+        ErrorExt.delCheckpoint("RecordConstructor");
         false = Util.getStatefulBoolean(stopElab);
         (cache,t as DAE.T_METARECORD(utPath=utPath,index=index,fields=vars,source={fqPath}),env_1) = Lookup.lookupType(cache, env, fn, NONE());
@@ -7259,4 +7269,8 @@
     case (cache,env,fn,args,nargs,impl,_,st,pre,_)
       equation
+        
+        ErrorExt.delCheckpoint("RecordConstructor");        
+        ErrorExt.setCheckpoint("elabCallArgs2FunctionLookup");
+        
         false = Util.getStatefulBoolean(stopElab);
         (cache,typelist as _::_) = Lookup.lookupFunctionsInEnv(cache, env, fn, info)
@@ -7270,4 +7284,7 @@
         Util.setStatefulBoolean(stopElab,true);
         (cache,expProps) = elabCallArgs3(cache,env,typelist,fn,args,nargs,impl,st,pre,info);
+        
+        ErrorExt.delCheckpoint("elabCallArgs2FunctionLookup");
+        
       then
         (cache,expProps);
@@ -7283,4 +7300,6 @@
         types_str = "\n  " +& Types.unparseType(tp1);
         Error.addSourceMessage(Error.NO_MATCHING_FUNCTION_FOUND, {fn_str,pre_str,types_str}, info);
+        
+        ErrorExt.delCheckpoint("elabCallArgs2FunctionLookup");        
       then
         (cache,NONE());
@@ -7293,4 +7312,6 @@
         s = SCodeDump.restrString(re);
         Error.addSourceMessage(Error.LOOKUP_FUNCTION_GOT_CLASS, {fn_str,s}, info);
+
+        ErrorExt.delCheckpoint("elabCallArgs2FunctionLookup");
       then
         (cache,NONE());
@@ -7299,5 +7320,4 @@
       equation
         (cache,typelist as _::_::_) = Lookup.lookupFunctionsInEnv(cache,env, fn, info);
-
         t_lst = List.map(typelist, Types.unparseType);
         fn_str = Absyn.pathString(fn);
@@ -7306,4 +7326,6 @@
         //fn_str = fn_str +& " in component " +& pre_str;
         Error.addSourceMessage(Error.NO_MATCHING_FUNCTION_FOUND, {fn_str,pre_str,types_str}, info);
+        
+        ErrorExt.delCheckpoint("elabCallArgs2FunctionLookup");
       then
         (cache,NONE());
@@ -7316,5 +7338,8 @@
         true = Config.acceptOptimicaGrammar();
         cref = Absyn.pathToCref(fn);
+        
         (cache,SOME((daeexp as DAE.CREF(daecref,tp),prop,_))) = elabCref(cache,env, cref, impl,true,pre,info);
+        ErrorExt.rollBack("elabCallArgs2FunctionLookup");
+        
         daeexp = DAE.CREF(DAE.OPTIMICA_ATTR_INST_CREF(daecref,name), tp);
         expProps = SOME((daeexp,prop));
@@ -7329,4 +7354,6 @@
         fn_str = Absyn.pathString(fn);
         Error.addSourceMessage(Error.LOOKUP_ERROR, {fn_str,scope}, info); // No need to add prefix because only depends on scope?
+
+        ErrorExt.delCheckpoint("elabCallArgs2FunctionLookup");
       then
         (cache,NONE());
@@ -7339,4 +7366,6 @@
         fn_str = fn_str +& " in component " +& pre_str;
         Error.addSourceMessage(Error.NO_MATCHING_FUNCTION_FOUND_NO_CANDIDATE, {fn_str}, info);
+
+        ErrorExt.delCheckpoint("elabCallArgs2FunctionLookup");
       then
         (cache,NONE());
@@ -7344,4 +7373,5 @@
     case (cache,env,fn,args,nargs,impl,_,st,pre,_)
       equation
+        ErrorExt.delCheckpoint("elabCallArgs2FunctionLookup");
         true = Flags.isSet(Flags.FAILTRACE);
         Debug.fprintln(Flags.FAILTRACE, "- Static.elabCallArgs failed on: " +& Absyn.pathString(fn) +& " in env: " +& Env.printEnvPathStr(env));
