Release locks on error in `splitLeaf`.

Closes #281.