Correctly handle including dependencies of dependencies (of dependencies...) of required migrations.