Adding support for automatically resettable flags.