Index: tableheader.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/tableheader.js,v
retrieving revision 1.22
diff -u -r1.22 tableheader.js
--- tableheader.js	13 Mar 2009 23:15:08 -0000	1.22
+++ tableheader.js	12 Apr 2009 15:13:13 -0000
@@ -71,7 +71,7 @@
       // Check the previous anchor to see if we need to scroll to make room for the header.
       // Get the height of the header table and scroll up that amount.
       if (prevAnchor != location.hash) {
-        if (location.hash != '') {
+        if (location.hash != '' && $('td' + location.hash).size()) {
           var scrollLocation = $('td' + location.hash).offset().top - $(e).height();
           $('body, html').scrollTop(scrollLocation);
         }
