Hey Gailwin,
I was having the same error as you restoring iMac I had to replace, which is how I found this board with a Google search for the error.
I had taken an image of the HD with disk utility and wanted to restore it so my replacement iMac was where I left off with the one that ha to go back.
What my problem was, as I think is yours, is that you HD you are restoring your .dmg to share the same name. So
YourHD (which is the drive your restoring too) and
YourHD.dmg (which is the image).
When the disk image is mounted it is referred to in the Volumes directory (in the Terminal) as
YourHD-1 as your actual HD has already taken the name
YourHD.
The easiest way to solve the problem is to rename your HD you are restoring too, and everything should be fine. It worked for me...
Hope that helps,
/ Hami