I have been having exactly that problem, last night I started picking up builds even on files that were on a different root. That was because I had used settings/control panel/system/advanced/environment variables to set a long
string containing every dir I could think of and then later was trying to work on a temporary version without disturbing the main build.
See:
@argfiles which is likely more useful. This allows fast access to a configuration file that is stored with the sources.