Fix #3483 and simplify readCodingpasses()
Merge pull request #4637 from fkaelberer/issue3483

Fix #3483 and simplify readCodingpasses()