diff --git a/core/includes/common.inc b/core/includes/common.inc
index 8438f88..cf965fd 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -994,7 +994,7 @@ function drupal_attach_tabledrag(&$element, array $options) {
     'subgroup' => NULL,
     'source' => NULL,
     'hidden' => TRUE,
-    'limit' => 0
+    'limit' => -1,
   );
 
   $group = $options['group'];
diff --git a/core/misc/tabledrag.js b/core/misc/tabledrag.js
index 01d4654..6a9ffba 100644
--- a/core/misc/tabledrag.js
+++ b/core/misc/tabledrag.js
@@ -58,7 +58,7 @@
     this.oldRowElement = null; // Remember the previous element.
     this.oldY = 0; // Used to determine up or down direction from last mouse move.
     this.changed = false; // Whether anything in the entire table has changed.
-    this.maxDepth = 0; // Maximum amount of allowed parenting.
+    this.maxDepth = -1; // Maximum amount of allowed parenting, -1 if unlimited.
     this.rtl = $(this.table).css('direction') === 'rtl' ? -1 : 1; // Direction of the table.
     this.striping = $(this.table).data('striping') === 1;
 
@@ -79,7 +79,7 @@
             if (tableSettings[group][n].relationship === 'parent') {
               this.indentEnabled = true;
             }
-            if (tableSettings[group][n].limit > 0) {
+            if (tableSettings[group][n].limit > -1) {
               this.maxDepth = tableSettings[group][n].limit;
             }
           }
@@ -1131,7 +1131,7 @@
       // Do not go deeper than as a child of the previous row.
       maxIndent = $prevRow.find('.js-indentation').length + ($prevRow.is('.tabledrag-leaf') ? 0 : 1);
       // Limit by the maximum allowed depth for the table.
-      if (this.maxDepth) {
+      if (this.maxDepth > -1) {
         maxIndent = Math.min(maxIndent, this.maxDepth - (this.groupDepth - this.indents));
       }
     }
