I did a bit more research into this. I suspected my own permalink setup may have been causing problems.
Disabling permalinks does not fix the problem. Inserting an image into a post with link to page creates the following link http://www.discovermooloolaba.com.au/?attachment_id=39
instead of http://www.discovermooloolaba.com.au/?p=29
as I imagined it would.
This may explain why duplicate titles occur, but I dont know how to fix it.
I am also getting the same problem eckelwood is getting.