Since "upgrading" to IE7 a year or more ago I have still not got out of the single window habit and when closing a web page down (slow learner). I automatically go for the top RH corner to click the close button. I cannot get out of the habit of this but what really drives me crazy is the unintuitive way that IE7 deals with this.
If I click the top RH button then it goes without saying that I want to close the active window. In IE7, if I have two or more tabs open, I get the "Do you want to close all tabs?" message. I then click "No" and IE7 does nothing.
I then have to go to appropriate tab and close it. Why the H does it not close down the active window automatically?
Try building a new habit: CTRL-W closes the current tab only in both IE and FireFox.
A note from the "glass-half-full" side: there are times when I attempt to minimize the browser and accidentally hit the X instead of the minimize icon, and am thankful it doesn't close all of the 10 or 20 working tabs I have open.
Another plus with FireFox in respect to tabs: if you have to reboot, leave the browser open and just reboot, allowing the system to close it down. Next time you launch, FF will restore the session, opening all your last windows for you including any low-level logins requiring a cookie. Awesome time saver.
Out of the box, FF isn't much better, but there are a pile of options and extensions you can use to change behavior.
One of the nice things about using extensions, is it helps re-enforce a new habit. At least for me, when I install an extension to alter a function of the browser behavior, it automatically creates a "habit" in the way I browse. By consciously choosing and installing an extension, it plants the seed in my brain that I need to change the way I work in the browser.