Surely there's gotta be a better term for this. Recency bias?
It's called context taint.
You'll love taint checking then.
https://en.wikipedia.org/wiki/Taint_checking
https://semgrep.dev/docs/writing-rules/data-flow/taint-mode/...
It's called context taint.