migratebundle: relation inference

The testing is a little on the light side, but has been manually verified against all known bundles
that we need to migrate.

done.