At the risk of being a thread killer I am going to repeat what has been said many times, here and on many other forums. We are discussing very old lenses. The M series dates back to the late 70s, which means that many of them are around 40 years old. How many times has that lens been dropped? Has it spent a large part of its life rolling around in a box with other hard objects? Has it been torn apart by some ham fisted repairman, or another do it yourselfer who knew next to nothing, and then re-assembled improperly? For crying out loud, how well will you work at 40 years old? The SMC Pentax M 50mm f1.7 lens is very sharp, in many cases more so than the M 50mm f1.4, and neither lens is a slouch. I own them both and they are both exceptional lenses. In fact, if I were to get rid of either of them, which is not likely to happen anytime soon, it would be the 1.4. The optical formula for a 50mm lens really is not that different between lens manufacturers and each one of their individual 50s have very, very similar designs, whether they are Nikon, Canon, Pentax or anyone else. If someone tries to make you believe different they are wrong. If you don't believe me do some reading, you might be surprised at how similar they all are beneath their brand names. You appear to have gotten your hands on one that has a problem. Do some more testing, toss it in your own box, post it up on E-Bay (as many do), or do the right thing and send it to a competent camera repair person and have it checked out and fixed if possible. But please don't give the impression that your lens is representative of the entire series. It's not!
Man I am getting grumpy...time to go to bed.