Someone proposed a patch to fix it here:
I've attached it as a diff. Can I have some confirmation from BB users that the patch works well?
I've modified this a bit to improve the checking and to suit a larger range of imports - the fix is now in 1.9Stable and HEAD
Dan, thanks for fixing this issue.
Unfortunately I'm not able to test it, however I've requested help with testing in the forum discussion http://moodle.org/mod/forum/discuss.php?d=48666#p583194