Fix parallel builds with empty trees.