Why is the Mountain Lion Installer unable to complete due to recovery partition problems?
From what I've been able to gather, this issue occurred because of the existence of partition 4. A default install of OS X, as of Lion, involves three partitions: EFI, your OS X boot volume, and the recover partition.
Features such as Recovery Mode and FileVault require original partitioning schemes in many cases - especially when FileVault is already in use on a partition, as it the partition scheme has been converted to a CoreStorage group. This makes things much messier to try installing without an original layout.
This seems to be the most likely cause of your error. Since I have no logs, dumps, or other material to go by, I can only speculate and apply my knowledge and experience to the matter. However, seeing as OS X installed just fine to the 4th partition, which was blank, it seems to me that the partition scheme itself was to blame, as I stated above. Sorry about the inconvenience.
Good luck and happy upgrading!