one way to check is to make sure the SRAM is connected properly in your schematic. Since the variable maybe forced to stay in the external SRAM, failure may cause it get incorrect data.
since its working when it is placed in the internal RAM, I am suspecting this.
Thanks for your response.
I had a closer look at this, and noticed that the Keil uVision IDE, for some reason, placed xram at 0x4000. There simply is no memory at 0x4000 in an FX2LP. When I removed the settings for the external memory settings in the 'Target' tab and rebuilt, everything worked just fine.