Have your friend check the putnpc txt script - I just tested the bug you mentioned, and the putnpc script sets global variables, flags, and this.vars just fine...
Make sure that your variable names are all the same completely... including how they're capitalized. For example, FxBug is not the same as FxBuG or fxBug.
Also, make sure that you're checking the right fields in the script debugger. The field for global/level-wide variables is the upper right hand corner. The field for this.vars set is in the bottom box in the second column (to the right of the area where you see the script). Also, in case you didn't know... pressing F6 pops up the script debugger.
Sorry if I over-simplified this or something...