PDF: fix edge case in openjpeg fix (fixes issue 2159)