In my past experience with the AF540FGZ, I didn't encounter the pin being stuck, but rather finding it a little hard to install the flash on the K10D. Maybe the plastic piece (on the hotshoe) is a little too thick for the metal holder on the K10D.
Same problem, now I have scratches on my camera's hotshoe caused by metal pins of FGZ 540.