I own the same lens, it's not the best Pentax (it's the same project as the old second generation K series one), but it should perform at infinity as well as at mid distance. Adjusting the focusing helicoid should be cheap enough to justify the investment. Any decent repairman is perfectly capable to do that. If you can find one close to your house you'd also save on delivery expenses. No need to pay the premium for the official Pentax repair center.
If you decide to part with your lens, and you like to consider another one with A contacts, the Sigma Super Wide II 2.8/24mm is probably the best choice.
It's not as nicely built as the Pentax-A, but optically is at another level.
I have a pdf of an MTF test done in Germany in the early eighties, where the Sigma beats all the other contenders. Second is the Leica R.
The Pentax-A beats most third party lenses but as far as far as I remember was the last or second last of the big brands.
The differences, as it often happened with rather extreme wide angles, were quite impressive.
This is to say that the 24mm is a good lens stopped down, but it is not on par with modern wides of the same brand... and also the best 3rd party offerings. This is why I have a Samyang
If anybody is interested in the test, I will find it and post a couple of jpg's.
Cheers
Paolo