Mr Thoby, as always, you are doing a really in depth reporting when doing something. I cannot answer the why for PtGui, but for Autopano only.
Between v2.0.9 and 2.5 series, only dcraw was updated. The v2.0.9 was already using the camera sensor to be able to get the orientation, so the real difference is reduced to dcraw.
BTW: to confirm that, you could try to use the latest XNView on the same images set. If you got the same behavior ( one wrong image ), it is quite for sure dcraw.
YES, the problem comes from dcraw. I have got the definitive answer from Erik Krause:
<< dcraw uses the Canon Makernotes "CameraOrientation" flag (which can't be switched off), not the EXIF Orientation (which contains the correct value). I already complained to Dave Coffin.>>
And I have verified his statement:
I had to open Windows XP on the Mac and then run exiftoolgui.exe. "CameraOrientation" is found in the Tag Name column and the rotation in the MakerNotes of the Content column: The value confirms the wrong behavior that we observe!
I could not find "CameraOrientation" in the standard whole "ExifTool" extracted list by only executing a shell in the Terminal of the Mac... I might thus have to learn how to use it better to get the most of it.