Fix config.flags is never passed to xml

This feature would be much welcomed. I understand you are refactoring this project, but even then having this could be useful to some people.

Thanks!