Fix migration that ate parent ids if there were no duplicate
Merge branch 'hotfix/migration_ate_threading'