Ran into this in 5.2.1, so this seems to still be an ongoing bug. This (russwb) method worked for me. Actually all I did was:
- Close the editor
- Rename the variable in C++
- Recompile in Visual Studio
- Re-open editor to verify the changes. At this point it seemed to have fixed, albeit with a different name
- Name it back and recompile + reopen