??? Dunno but how long would it take someone to go back into a course and add an ID number on existing server If that is the issue?
If all you have are the backups, might have to un-compress a copy of a course and see what it says in moodle_backup.xml for a course ID. Guess there could be some character or combo of characters in there that could cause moosh confusion ... dunno ... just guessing now.
In doing the same thing on Linux servers I know for a fact that ID numbers were not in the course configs nor backups and had no such issue upon command line restore ... just had to have the categories in new site populated so I could use the category ID to restore.
'spirit of sharing', Ken