fix the parent writing code to only call calc_prefix_len once, like we did for the leaf code.
fix the parent writing code to only call calc_prefix_len once, like we did for the leaf code.

zumero/Elmo,zumero/Elmo