One of the things I gleaned a while back from the Ethical Slut was the idea of scripts. The way behaviors that we all know by rote from society, media, etc. The ones that tell us what we're supposed to do with a given situation.
Like when your wife sneaks up behind you while you're browsing dates sites, Russian mail order brides, porn, golf clubs that you can't afford, whatever.
I find that from time to time I still have to fight the urge to fall into the classic scripts, and the biggest aids to break free of them has been getting 'caught' in something and the reaction of my wife being different than what would be expected.
I could totally see myself accidentally doing something similar. Hell, I still get uncomfortable about her looking over my shoulder while I'm looking at OKC, even though we both have our profiles linked. It's just that learned automatic response.
For some things, it's taken the embarrassment of being caught, and occasionally my wife doing something like giving me the "you're so pretty" look and telling me "don't be stupid dear". When the consequence doesn't live up to the nightmare, it's easier to realize that the action isn't "wrong".
For the most part, I wouldn't sweat it. It sounds like there's far more going on that would compel your husband to hide...not to lie to you, but to hide the truth from himself perhaps. If your reaction isn't to scream and shout, but instead give him a disappointed look and pat on the head for being stupid, then you might find he'll figure out it isn't worth trying to lie...even automatically.
Sometimes breaking the shackles is a two person job.