I didnt quite understand what you were experiencing so I tried it and you're right, it doubles the r instead of letting you type "re". You already know the solution, but others might not - just let it enter theyrr and when you hit the space it changes to they're. Either that or enter the apostophe yourself. I tried other words ending in "re" and the problem doesn't duplicate.
This could be a security feature of the OS. Frequently programmers will enter a non-fatal code glitch to secure against those copying the code. If it appears that someone has copied the code, then this glitch will show up in the copied product. It's similar to mailing lilst copyrighters entering a fake name to protect against copiers, or map makers entering a non-existant road for the same reason.
This glitch brings up the fact that when you're entering text and the touch enters a suggested prefill, if you accept what the touch is suggesting, just hit the space key and the suggested word is entered and you're ready to continue entering.
It seems that many people today wouldn't encounter this particular anomoly since they incorrectly use "there" or "their" instead of "they're".