Indeed, you are correct. And the heuristic clearly isn't as simple as whether or not the cursor is at the start of the word. Clicking between O and P produces a seemingly pseudorandom alternation that probably has some basis in statistics.
I remember that the iOS 1 videos Apple made to introduce the soft keyboard mentioned that the size of the keys change based on the actual word that you're typing. (It's very unlikely for a user to want to type an S after typing P-I-Z-Z)
Yeah, I used to demonstrate this my typing "Americ" and then touching down directly over the 's'. Even though I pressed the 's', it was the 'a' that appeared. You could clearly see I wasn't even touching 'a'.
I think they got rid of this feature a few versions ago because I haven't been able to reproduce it. I suspect (but have no evidence for) that this is related to the typing lag that was really bad in ios 2 or 3. From my perspective, it seems they weren't able to fix the realtime correction so they made it asynchronous and just fix up words after you hit space. This is how it seems to perform now (and let's them offer more features like multi word correction).