Living in a shotgun house has convinced me this effect is
very real. When I have to walk from the front to the back, I have developed the habit of saying what I'm going to do as I walk through each of the five doors I have to pass through; this puts my intent into a different mental pipeline, that's
much more resistant to being flushed out when I pass through a door.
If my husband is at home then he tends to get in on the act, leading to conversations like "I should set a timer for five minutes." "You should set a timer for five minutes!" "I'm gonna set a timer for five minutes." "Didja set that timer for five minutes?" "I just set a timer for five minutes!" when I'm crossing from the kitchen to the living room and leaving some water to boil.