This MR fixes a very subtle bug exposed by #24242.
See Note [Environment for simplLetUnfolding]
Note [Environment for simplLetUnfolding]