This is mainly a _suspected_ bug in libexif, as I cannot verify it myself atm directly.
Here's what happens:
An application which uses libexif, i.e. Eye-Fi Helper, corrupts the Exif information in imgs generated by a Pentax K-5.
The corruption occurs when Eye-Fi Helper adds Geolocation data, by then removing the entire "Pentax" section as well as the "Lens ID" information, making automatic lens detection impossible with such modified imgs.
Of course, it's not 100% sure that this isn't a fault of some other component. As I'm not the developer of the Eye-Fi software, I can only deduct that there's a good possibility this is caused by libexif.
To see the results of what happens, see this forum thread (started by me): http://forums.eye.fi/viewtopic.php?f=3&t=6227&sid=7cb589390250cf26a230e8913e8d0eae&p=24053#p24053
As you can use the orginal img from that post, you could verify whether it's actually libexif that's at fault here.
(I've attached the sample imgs to this report as well.)
Of course, it would be great if the Eye-Fi development team would take care of this, looking into the cause of this bug and maybe even fix it in this open source themselves, but I am not that optimistic.
I also like to point out that the "exittool" by Phil Harvey doesn't suffer from such a corruption when adding geoloc data.