If data is updated so that some nodes no longer have children, and a
custom children accessor is used, then the children array was not being
removed for such nodes, which meant that hierarchical layouts were
incorrectly taking into account these children.
Fixes#1579.