delete non leaf nodes with zero children from local copy