The tree before unlinking:
  li:{non-empty} FIRST te:{key1} LAST te:{key2}
   te:{key1} {val1}
   te:{key2} {val2}
The node before unlinking:
  te:{key1} {val1}
tree_unlink: done
---
The tree after unlinking:
  li:{non-empty} FIRST te:{key2} LAST te:{key2}
   te:{key2} {val2}
The node after unlinking:
  te:{key1} [unlinked] [detached] {val1}
========
The tree before unlinking:
  li:{} [root] FIRST li:{empty} LAST li:{non-empty}
   li:{empty} 
   li:{non-empty} FIRST te:{key2} LAST te:{key2}
    te:{key2} {val2}
The node before unlinking:
  li:{} [root] FIRST li:{empty} LAST li:{non-empty}
Error during tree_unlink: operation would render the document invalid
The tree after unlinking:
  li:{} [root] FIRST li:{empty} LAST li:{non-empty}
   li:{empty} 
   li:{non-empty} FIRST te:{key2} LAST te:{key2}
    te:{key2} {val2}
The node after unlinking:
  li:{} [root] FIRST li:{empty} LAST li:{non-empty}
