A fix to openjpg for IRasterIO, and a faulty if block