[1.7.x] Fixed #22875: Optimizer did not take through= into account.
[1.7.x] Include swapped apps in autodetector state
[1.7.x] Clean up syncdb parts of migrate output if no synced apps