[3.11] GH-91409: Don't overwrite valid locations with NOP locations (GH-95067) (GH-95068)

(cherry picked from commit 742d4614e1a645d765dbf76c19bd9a818239b1cb)
3 files changed