Use XMLFOREST consistently to generate optional elements