Project file lists are cached, so if you are changing some property on the fly via macro, you may need to clear the cache. Try _clearProjectFileListCache()
/**
* Clears the cached file list for the given project. This
* should be called whenever a project changes.
*
* @param workspaceFile full path to workspace file
* @param projectFile full path to project file
*
* @categories Project_Functions
*/
extern void _clearProjectFileListCache(_str workspaceFile, _str projectFile);