Fix bugs in migration program
|Reported by:||Nicklas Nordborg||Owned by:||Nicklas Nordborg|
The migration tool is not stable if it encounters a Base 1 installation that has inconsistent data. For example, there might be references to ID:s that no longer exists. This can result in an exception in the migration tool.