You can fix this by continuing to look after you’ve found something. “Phew, glad my keys were in the first place I looked, and not the next ten”
Just in case you find any extra keys to unlock those bonus rooms, it's just good completionist practice.
The Fallout 3 "I'm going to find every last tin can in this creepy abandoned building" method.
It’s important not to end the experiment prematurely in order to obtain a proper set of data. Otherwise we end up with conclusions like, “it’s always in the last place you look.”
You never know, there could be more keys. Confirmation bias is a powerful thing.
I always do my searches in constant time, to foil timing attacks.
I like to start with a failing unit test by deliberately looking for the keys somewhere I know they’re not.
It's important you do this to defeat timing based attacks that might try to determine where you usually put your keys based on the time taken to cut short the search.
I find they’re often in the first place you look but that you miss the on the first cursory look.
A lot like getting the USB plug right the first time but not realizing it. Happens every time.