Hey there
@spectrum , After investigating this issue I have concluded that you actually get this wanted level after you attack the train NPC.
To be honest I don't know if this is how it was intended to be because the name of the train driver is not scripted to look ''how it should appear normally''.
For example, When you attack the airport guard it is shown in your crimes as 'Assault with a deadly weapon (Airport guard)', but instead when you attack this NPC it is shown as 'Assault with a deadly weapon ([NPC]TRAIN3) and instead of giving you 1 star as other NPCs like the bank guard, it gives 2 stars (just like you attack a normal player)
With this explained i would leave this issue to
@Mike as he can correct anything in the script he didn't intend to make.