Fix regression caused by dirty tree