Fix regression tests.

Don't run two time migrations of the same jobs which leads to strange
unpredictable results. Also fixed the check to look for the correct
ids.