gh-104615: don't make unsafe swaps in apply_static_swaps (#104620)

14 files changed