Fix #3483 and simplify readCodingpasses()

Fixes faulty end-of-stream check if number of bytes is odd (#3483).