BUG: TreeNode.prune was ignoring length

Pretty quick one, `TreeNode.prune` was not handling length