diff --git a/core/includes/common.inc b/core/includes/common.inc
index e66261e..99a98b9 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -795,7 +795,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 8754b98..bdac89c 100644
--- a/core/misc/tabledrag.js
+++ b/core/misc/tabledrag.js
@@ -118,11 +118,11 @@
     this.changed = false;
 
     /**
-     * Maximum amount of allowed parenting.
+     * Maximum amount of allowed parenting, -1 if unlimited.
      *
      * @type {number}
      */
-    this.maxDepth = 0;
+    this.maxDepth = -1;
 
     /**
      * Direction of the table.
@@ -181,7 +181,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;
             }
           }
@@ -1336,7 +1336,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));
       }
     }
