Court reverses ruling in timber lawsuit