That function mentioned is known to break things when an ingredient table has been created incorrectly. In theory the base game itself should crash, but for some reason doesn't, which means broken mods get published without issue.
My mod assumes (I'm going to need to robustify this a bit more) that nobody else messed up, which isn't always true, especially if the game engine isn't flagging the error in other mods.
considering someone else has reported the same error very recently when using Py's mods, I'm guessing the actual error is in there.
However, I will try to improve my function even further to try and avoid such errors.