I could even try to unpack the asar file, but I have zero JS experience so I'd probably just get confused :PThough... now knowing the core is likely JS, it might be more likely an object issue than a variable issue.
You seem to be on the money:
I found a problem when NPCs are created, the code sets id but doesn't set a name variable, so it fell back to the player name instead