I have noticed the same thing thing and it has been almost seven months since I last had a drink. I was in a 7/11 grabbing a Diet Coke and out of the blue I just thought I would grab a pint of vodka and get a nice buzz going. I didn't have anything cause that thought other than it was something I would have done in the past. It took me a minute to get my bearings and remember that I don't drink anymore.
I sometimes wonder if these cravings act in a similar way to muscle memory. Your mind makes associations and when you are doing a familiar activity or in a familiar place the cravings can come on very quickly. Good for you for recognizing where those thoughts would lead you and beating back the craving.