title: Making a copy of a FeinCMS page tree using django-mptt changes child order
body: <p>I'm trying to make a copy of a FeinCMS page tree, which is managed using django-mptt. I wrote this function:</p>
  
  <pre><code>def make_tree_copy(page, parent=None):
      '''
      Makes a copy of the tree starting at "page", reparenting it to "parent"
      '''
      new_page = Page.objects.create_copy(page)
      new_page.save()
      Page.tree.move_node(new_page, parent)
  
      # re-read so django-mptt fields get updated
      new_page = Page.objects.get(id=new_page.id)
      for child in page.get_children():
          # re-read so django-mptt fields get updated
          child = Page.objects.get(id=child.id)
          make_tree_copy(child, new_page)
  </code></pre>
  
  <p>and call it using</p>
  
  <pre><code>make_tree_copy(Page.tree.root_nodes()[0])
  </code></pre>
  
  <p>It works in general but when I have a page tree looking like this:</p>
  
  <pre><code>A
  |- B
     |- C
     |- D
  </code></pre>
  
  <p>It comes out as this:</p>
  
  <pre><code>A
  |- B
     |- D
     |- C
  </code></pre>
  
  <p>From my stepping through the mptt code, the magic seems to happen in mptt/managers.py/_inter_tree_move_and_close_gap(), where for some reason the "lft" values of the grandchildren get changed. Before the move they are C=3, D=5, afterwards they are C=5, D=3.</p>
  
  <p>Which explains why D gets sorted before C but I have no idea why these values get switched. Any thoughts?</p>