FiveM streamed "traintracks.xml" crashing game

I have a resource that attempts to stream custom trains. Both “trains.xml” and “traintracks.xml” are streamed via custom gta5.meta level meta. The metro train works with no problem, but whenever any player goes near any freight train track, it immediately crashes. It is always the exact same crash every time (below).

However, stopping the “traintracks.xml” stops the crashing, but freight trains never spawn.

Any help is greatly appreciated. Thanks!