A tab can be closed if you click on it by using the mouse's middle button. Make sure you are not clicking on a tab with the middle button, or that the middle button isn't stuck with the left button. Try a new mouse; if the problem stops, then there was an issue with the middle button of your mouse.