I don't know if this happens in all images but it sure happens in Nikon D700 and Canon EOS10D raw images.
I'm using XnView with Shell Extension for Windows 7 x64
In the following image you can see how a portrait CRW file is correctly oriented in XnView but not in the thumbnail of the Shell Extension. (The icon thumbnail, the preview and the status bar thumbnail in the explorer window are provided by FastPictureViewer WIC Codecs)

Uploaded with ImageShack.us