Fix failures in mercurial tests
Fix unit test failures when build is not built again