I think the fact that we find these constructions in published books--and fairly widely, in my opinion--doesn't so much mean we shouldn't follow those awful examples of misuse, as proves that it's a perfectly acceptable use of language.
It's no shocker that writer-types are going to henpeck grammar and syntax to death, no matter where we find it. The vast majority of readers, though, use a solid understanding of basic language, idioms, laws of physics, and common sense to determine the meaning of sentences.
When someone reads "Unlocking the door, he let himself out," no one thinks "My god! How in Hades did he stretch his arms out the window and open the door from the outside!?" This thought never enters most readers' minds because most of us automatically dismiss absurd interpretations of language. "Writers" and other grammarians might have a chuckle; most people are completely aware of the author's intent.
Yes, we should avoid awkward situations, like "Getting out of bed, he caught the bus," and I realize some people are going to have different levels of tolerance for what's "awkward." But I don't see any reason why, if the structure makes contextual sense, can't legitimately be misconstrued, and doesn't confuse the reader, we shouldn't use the structure to our full advantage for variety, flow, rhythm, and nuance.
Readers aren't stupid, and in my opinion, the idea that you must always avoid the construction was thought up by the same people who iron their underwear. It's a valid construction--writers use it; readers understand it.