Fix a bug where tools_def.txt is not patch after the first checkout