tiff/lzw: don't follow code == hi if last is invalid
tiff/lzw: don't follow code == hi if last is invalid

This does for x/image what
https://go-review.googlesource.com/c/go/+/45111/ did for the standard
library's compress/lzw.

The x variant is a fork of the stdlib, with an extra, explicit tweak
because the TIFF format is "off by one" - a mistake (not Go specific)
somebody introduced decades ago and that we can never fix, given all the
existing TIFF files out there in the wild.

When previously patching the stdlib variant, I was supposed to also
patch the x variant, but forgot.

Updates golang/go#11386

Change-Id: Ic74f9014d2d048ee12cdd151332db62b76f1cde2
Reviewed-on: https://go-review.googlesource.com/c/image/+/191221
Reviewed-by: Bryan C. Mills <1c8aad60184261ccede67f5c63a0d2a3bf3c9ff4@google.com>

golang/image