appendSubtree was failing on missing 0-length sequences