jpegdec: don't overwrite the last valid line