Oxide -
Hmmm. Thanks for providing all the relevant info.
First, I will say I have likely not tested my script with a playlist comprised of that number of songs (purely for time convenience in testing). So there could be some weirdness happening that I have not tested for.
That said, we should probably continue this discussion off-thread. As a first step when I get these kinds of questions/problems the first thing I do is ask the person (you) to locate my email contact in your download (for my script) Readme file, and then email me your problematic m3u file. Quite often I will recognize an issue right away when I look at that file.
So, please send me the file, because if I have software bugs, I want to know about them.