Hello there,
It appears that a reference to a material dependency is invalid. I’ve not encountered this issue and do not have a repro for it, but would it be possible to breakpoint ShaderCompiler.cpp:2108 or check if MaterialDependencies[MaterialIndex] is invalid.
Potentially, there’s a material that references or is referenced by those material functions and those material instances.
Best regards,
Chris