The code was using parent_ref() to set the parent ref's node pointer.
But parent_ref() uses the parent's left node pointer to determine which
ref points to the node. If we were setting the left it would return the
right because the left isn't set yet. This messed up the tree shape and
all hell broke loose.
Just set it through the ref, we have it anyway.
Signed-off-by: Zach Brown <zab@versity.com>