We must use entity_load_multiple() if we want the migrations in the correct order.
Use the array keys for calculating the missing migrations.
Merge pull request #1053 from benjy14/fix-migrate-dependencies

We must use entity_load_multiple() for dependant migrations