WIP try to make the flag hacking saner

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>