Ah, I understand now! I was testing it with the Dispatcher mod and found a few issues, but didn't run into that one yet. In my case, I'm having the stop rename itself to match a Dispatcher destination station, so trains usually do not have that stop name directly in their schedules, but I can imagine with multiple trains it might become an issue.
The issues I posted on your GitHub are not directly related. I tried a refactor of my own to fix them, you are welcome to use any part of it.