After upgrading to Firefox 4, the Undo Close Tab feature stopped working.
My solution was to close Firefox, then enter the profile directory and remove the "sessionstore.js" file (not sessionstore-1.js, etc. - just remove the one without a hyphen and a number). This immediately fixed the problem.