tiff: compression correctness fixes