build system: do not rebuild entire tree if it is moved