Copy parser structure more efficiently, add test for has_child "type" ordering