[BUGFIX] Loop confuses variable check on migrating
[BUGFIX] Loop confuses variable check on migrating

When migrating code and not specifying a package to work on, the code
would get confused after the first available migration, because the
internal loop used $packageKey as well.

Change-Id: Ie680e8b54f4ffc069edc6b1896b803e53cfacb0c
Related: #40263
Releases: 1.1, 1.2
Original-Commit-Hash: d8d6fee4ae3e177c5b4f4509126c266f5410ef68

daniellienert/flow-development-collection,robertlemke/flow-development-collection,daniellienert/flow-development-collection,gerhard-boden/flow-development-collection,neos/flow-development-collection,albe/flow-development-collection,neos/flow-development-collection,kitsunet/flow-development-collection,mkeitsch/flow-development-collection,gerhard-boden/flow-development-collection,neos/flow-development-collection,kdambekalns/flow-development-collection,kdambekalns/flow-development-collection,aertmann/flow-development-collection,dfeyer/flow-development-collection,daniellienert/flow-development-collection,kdambekalns/flow-development-collection,fcool/flow-development-collection,chewbakartik/flow-development-collection,neos/flow-development-collection,bwaidelich/flow-development-collection,mkeitsch/flow-development-collection,dlubitz/flow-development-collection,dlubitz/flow-development-collection,albe/flow-development-collection,kdambekalns/flow-development-collection,gerhard-boden/flow-development-collection,dfeyer/flow-development-collection,mkeitsch/flow-development-collection,aertmann/flow-development-collection,chewbakartik/flow-development-collection,kitsunet/flow-development-collection,robertlemke/flow-development-collection,dfeyer/flow-development-collection,bwaidelich/flow-development-collection,chewbakartik/flow-development-collection,fcool/flow-development-collection,dlubitz/flow-development-collection,bwaidelich/flow-development-collection,fcool/flow-development-collection,robertlemke/flow-development-collection,robertlemke/flow-development-collection,fcool/flow-development-collection,dfeyer/flow-development-collection,kitsunet/flow-development-collection,albe/flow-development-collection,aertmann/flow-development-collection