Handle empty child nodes better.