When using autotools lyx2lyx_version.py is generated in lib/lyx2lyx under the build directory. If you run lyx in place, this directory is also taken into account and thus lyx2lyx_version.py is found:
I agree that this is convenient, but it is against the idea of source/build separation. Right now, a scons build will not touch or create any file (including config.h) in the source directory. I am not sure it is a good idea to change it. Bo