ModelingToolkit: Internal error in runtime

When creating a system image of Tethers.jl on Windows, I got this error:

Precompiling packages finished.
  503 dependencies successfully precompiled in 342 seconds. 26 already precompiled.
  23 dependencies precompiled but different versions are currently loaded (ArgTools, Base64, Dates, Downloads, JuliaSyntaxHighlighting, LibCURL, LibCURL_jll, LibGit2, LibGit2_jll, LibSSH2_jll, Logging, Markdown, MozillaCACerts_jll, NetworkOptions, Pkg, Printf, StyledStrings, TOML, Tar, UUIDs, Zlib_jll, nghttp2_jll and p7zip_jll). Restart julia to access the new versions. Otherwise, 374 dependents of these packages may trigger further precompilation to work with the unexpected versions.
  2 dependencies had output during precompilation:
┌ ModelingToolkitBase
│  WARNING: @nospecialize annotation only supported on the first 32 arguments.
│  WARNING: @nospecialize annotation only supported on the first 32 arguments.
└
┌ ModelingToolkit
│  Internal error: during type inference of
│  convert(Type{var"#s175"} where var"#s175"<:Tuple{Tuple{SciMLBase.ODEFunction{iip, specialize, F, TMM, Ta, Tt, TJ, JVP, VJP, JP, SP, TW, TWt, WP, TPJ, VJP_P, O, TCV, SYS, ID, NLP} where NLP<:Union{Nothing, SciMLBase.ODENLStepData{NLProb, SetU0, SetGammaC, SetOuterTmp, SetInnerTmp, NLProbMap} where NLProbMap where SetInnerTmp where SetOuterTmp where SetGammaC where SetU0 where NLProb} where ID<:Union{Nothing, SciMLBase.OverrideInitData{IProb, UIProb, IProbMap, IProbPmap, M, OOP} where OOP<:Union{Base.Val{true}, Base.Val{false}} where M where IProbPmap where IProbMap where UIProb where IProb} where SYS where TCV where O where VJP_P where TPJ where WP where TWt where TW where SP where JP where VJP where JVP where TJ where Tt where Ta where TMM where F where specialize where iip}, NTuple{19, Symbol}}, Tuple{Tuple{SciMLBase.ODEFunction{iip, specialize, F, TMM, Ta, Tt, TJ, JVP, VJP, JP, SP, TW, TWt, WP, TPJ, VJP_P, O, TCV, SYS, ID, NLP} where NLP<:Union{Nothing, SciMLBase.ODENLStepData{NLProb, SetU0, SetGammaC, SetOuterTmp, SetInnerTmp, NLProbMap} where NLProbMap where SetInnerTmp where SetOuterTmp where SetGammaC where SetU0 where NLProb} where ID<:Union{Nothing, SciMLBase.OverrideInitData{IProb, UIProb, IProbMap, IProbPmap, M, OOP} where OOP<:Union{Base.Val{true}, Base.Val{false}} where M where IProbPmap where IProbMap where UIProb where IProb} where SYS where TCV where O where VJP_P where TPJ where WP where TWt where TW where SP where JP where VJP where JVP where TJ where Tt where Ta where TMM where F where specialize where iip}, NTuple{19, Symbol}})
│  Encountered unexpected error in runtime:
│  AssertionError(msg="irinterp is unable to handle heavy recursion correctly")
│  collect_limitations! at .\../usr/share/julia/Compiler/src/ssair\irinterp.jl:4 [inlined]
│  from_interprocedural! at .\../usr/share/julia/Compiler/src\abstractinterpretation.jl:422 [inlined]
│  infercalls at .\../usr/share/julia/Compiler/src\abstractinterpretation.jl:277
│  jfptr_infercalls_78525.1 at C:\Users\ufechner\.julia\juliaup\julia-1.12.7+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
│  doworkloop at .\../usr/share/julia/Compiler/src\inferencestate.jl:1205
│  reprocess_instruction! at .\../usr/share/julia/Compiler/src/ssair\irinterp.jl:159
│  #224 at .\../usr/share/julia/Compiler/src/ssair\irinterp.jl:364
│  scan! at .\../usr/share/julia/Compiler/src/ssair\irinterp.jl:286
│  #ir_abstract_constant_propagation#220 at .\../usr/share/julia/Compiler/src/ssair\irinterp.jl:332
│  ir_abstract_constant_propagation at .\../usr/share/julia/Compiler/src/ssair\irinterp.jl:318
│  semi_concrete_eval_call at .\../usr/share/julia/Compiler/src\abstractinterpretation.jl:1266
│  abstract_call_method_with_const_args at .\../usr/share/julia/Compiler/src\abstractinterpretation.jl:893
│  abstract_call_method_with_const_args at .\../usr/share/julia/Compiler/src\abstractinterpretation.jl:868
│  handle1 at .\../usr/share/julia/Compiler/src\abstractinterpretation.jl:178
│  infercalls at .\../usr/share/julia/Compiler/src\abstractinterpretation.jl:252
│  abstract_call_gf_by_type at .\../usr/share/julia/Compiler/src\abstractinterpretation.jl:338
│  abstract_call_unknown at .\../usr/share/julia/Compiler/src\abstractinterpretation.jl:2891
│  abstract_call at .\../usr/share/julia/Compiler/src\abstractinterpretation.jl:2901
│  abstract_call at .\../usr/share/julia/Compiler/src\abstractinterpretation.jl:2897 [inlined]
│  abstract_call at .\../usr/share/julia/Compiler/src\abstractinterpretation.jl:3057
│  abstract_eval_call at .\../usr/share/julia/Compiler/src\abstractinterpretation.jl:3075 [inlined]
│  abstract_eval_statement_expr at .\../usr/share/julia/Compiler/src\abstractinterpretation.jl:3404
│  abstract_eval_basic_statement at .\../usr/share/julia/Compiler/src\abstractinterpretation.jl:3850 [inlined]
│  abstract_eval_basic_statement at .\../usr/share/julia/Compiler/src\abstractinterpretation.jl:3807 [inlined]
│  typeinf_local at .\../usr/share/julia/Compiler/src\abstractinterpretation.jl:4357
│  jfptr_typeinf_local_80842.1 at C:\Users\ufechner\.julia\juliaup\julia-1.12.7+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
│  typeinf at .\../usr/share/julia/Compiler/src\abstractinterpretation.jl:4515
│  typeinf_ext at .\../usr/share/julia/Compiler/src\typeinfer.jl:1256
│  typeinf_ext_toplevel at .\../usr/share/julia/Compiler/src\typeinfer.jl:1439 [inlined]
│  typeinf_ext_toplevel at .\../usr/share/julia/Compiler/src\typeinfer.jl:1448
│  jfptr_typeinf_ext_toplevel_80922.1 at C:\Users\ufechner\.julia\juliaup\julia-1.12.7+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
│  _jl_invoke at C:/workdir/src\gf.c:3995 [inlined]
│  ijl_apply_generic at C:/workdir/src\gf.c:4214 [inlined]
│  jl_apply at C:/workdir/src\julia.h:2394 [inlined]
│  jl_type_infer at C:/workdir/src\gf.c:466
│  _generate_from_hint at C:/workdir/src\gf.c:3834
│  jl_compile_now at C:/workdir/src\gf.c:3848 [inlined]
│  ijl_compile_method_instance at C:/workdir/src\gf.c:3861
│  precompile at .\loading.jl:4315 [inlined]
│  precompile at .\loading.jl:4315 [inlined]
│  precompile_mi at C:\Users\ufechner\.julia\packages\PrecompileTools\QUxvR\src\PrecompileTools.jl:11 [inlined]
│  foreach at .\abstractarray.jl:3191
│  recompile_invalidations at C:\Users\ufechner\.julia\packages\PrecompileTools\QUxvR\src\invalidations.jl:27
│  unknown function (ip: 0000022f8c8a84a3) at (unknown file)
│  jl_apply at C:/workdir/src\julia.h:2394 [inlined]
│  do_call at C:/workdir/src\interpreter.c:123
│  eval_value at C:/workdir/src\interpreter.c:243
│  eval_stmt_value at C:/workdir/src\interpreter.c:194 [inlined]
│  eval_body at C:/workdir/src\interpreter.c:707
│  jl_interpret_toplevel_thunk at C:/workdir/src\interpreter.c:898
│  top-level scope at C:\Users\ufechner\.julia\packages\ModelingToolkit\zh12i\src\ModelingToolkit.jl:27
│  jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:1035
│  jl_eval_module_expr at C:/workdir/src\toplevel.c:197 [inlined]
│  jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:814
│  jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:975
│  jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:975
│  ijl_toplevel_eval at C:/workdir/src\toplevel.c:1047 [inlined]
│  ijl_toplevel_eval_in at C:/workdir/src\toplevel.c:1092
│  eval at .\boot.jl:489
│  include_string at .\loading.jl:2952
│  _include at .\loading.jl:3012
│  include at .\Base.jl:306
│  include_package_for_output at .\loading.jl:3106
│  jfptr_include_package_for_output_71677.1 at C:\Users\ufechner\.julia\juliaup\julia-1.12.7+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
│  jl_apply at C:/workdir/src\julia.h:2394 [inlined]
│  do_call at C:/workdir/src\interpreter.c:123
│  eval_value at C:/workdir/src\interpreter.c:243
│  eval_stmt_value at C:/workdir/src\interpreter.c:194 [inlined]
│  eval_body at C:/workdir/src\interpreter.c:707
│  jl_interpret_toplevel_thunk at C:/workdir/src\interpreter.c:898
│  top-level scope at stdin:5
│  jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:1035
│  jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:975
│  ijl_toplevel_eval at C:/workdir/src\toplevel.c:1047 [inlined]
│  ijl_toplevel_eval_in at C:/workdir/src\toplevel.c:1092
│  eval at .\boot.jl:489
│  include_string at .\loading.jl:2952
│  include_string at .\loading.jl:2962 [inlined]
│  exec_options at .\client.jl:315
│  _start at .\client.jl:550
│  jfptr__start_59066.1 at C:\Users\ufechner\.julia\juliaup\julia-1.12.7+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
│  jl_apply at C:/workdir/src\julia.h:2394 [inlined]
│  true_main at C:/workdir/src\jlapi.c:985
│  jl_repl_entrypoint at C:/workdir/src\jlapi.c:1153
│  mainCRTStartup at C:/workdir/cli\loader_exe.c:58
│  BaseThreadInitThunk at C:\Windows\System32\KERNEL32.DLL (unknown line)
│  RtlUserThreadStart at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
└
julia> versioninfo()
Julia Version 1.12.7
Commit 6d172b025e (2026-08-15 08:05 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 16 × AMD Ryzen 9 7950X 16-Core Processor
  WORD_SIZE: 64
  LLVM: libLLVM-18.1.7 (ORCJIT, znver4)
  GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 16 virtual cores)

Can I ignore it? What could be the reason?

I saw something like that too, just updated to MTK 11.42. Julia 1.12.7.
Everything seemed to run ok though