[bug 1038236] Fix for bad data migration.

We've removed the offending data migrations, and added a one-off script for fixing the issues the data migration has caused.