Compilation failing because ROOT is searching for files in the source directory, and not in the installation directory

Hi, I am also affected by a very similar bug with v6.22.06. I grepped for the source paths in the installation directory and I found that they appear in the following files:

bin/root-config  # in the srcdir variable, unsurprisingly
config/Makefile.config  # in ROOT_SRCDIR and ROOT_OBJDIR

These occurrences do not seem related to the problem at hand. On the other hand, the source paths occur many many times in the binaries (libraries). I am not sure exactly what happens, but the problematic paths end up in a -I argument to g++ when I call gROOT->LoadMacro("somescript.C+").

I can provide more information if necessary.

Kind regards,
Davide