Increase unittest coverage for getChangesForBuild
Fix bugs raise by the unittests when several codebases are used.
Fix benallard's comment
Merge pull request #1429 from delanne/FixBug_getChangesForBuild

Fix bug get changes for build