There's a known inconsistency in the way certain combinations of optional components are handled. This is not really a bug, but rather an ambiguity in the way optional items are interpreted. It's likely to remain until JiBX 2.0:
If you run into problems with the code please check existing bug reports for information on fixes, and enter a new bug report if you don't find one matching your problem. JiBX uses the Jira issue tracking system hosted by The Codehaus. Please note that JiBX is not otherwise affiliated with The Codehaus, and other aspects of the project remain hosted on SourceForge. You can browse the Jira bug list without restriction, but will need to register in order to enter new issues.
You can help make sure your problem is addressed quickly and completely by attaching sample code to demonstrate the problem. The sample code should be packaged as a zip or tar.gz file, and should include an Ant build.xml script to compile the code, run the binding compiler, and (for runtime problems) execute a test of the binding. The starter example included in the JiBX distribution shows how this can work.