This patch changes optional groups to allow anchors in the 'else'
element group. When printing, the optional condition is inverted to
decide which group to print. This is useful for parsing concrete
optional elements that don't have a parseOptional* method or some
other way to test whether it's present.
Depends on D133805
This will only invert the first, is that intentional?