diff --git a/misc/tabledrag.js b/misc/tabledrag.js
index b566168..b468b0b 100644
--- a/misc/tabledrag.js
+++ b/misc/tabledrag.js
@@ -131,15 +131,12 @@ Drupal.tableDrag.prototype.initColumns = function () {
     }
 
     // Mark the column containing this field so it can be hidden.
-    if (hidden && cell[0] && cell.css('display') != 'none') {
+    if (hidden && cell[0]) {
       // Add 1 to our indexes. The nth-child selector is 1 based, not 0 based.
       // Match immediate children of the parent element to allow nesting.
-      var columnIndex = $('> td', cell.parent()).index(cell.get(0)) + 1;
-      var headerIndex = $('> td:not(:hidden)', cell.parent()).index(cell.get(0)) + 1;
+      var index = $('> td', cell.parent()).index(cell.get(0)) + 1;
       $('> thead > tr, > tbody > tr, > tr', this.table).each(function (){
         var row = $(this);
-        var parentTag = row.parent().get(0).tagName.toLowerCase();
-        var index = (parentTag == 'thead') ? headerIndex : columnIndex;
 
         // Adjust the index to take into account colspans.
         row.children().each(function (n) {
