Fix to previous flag update changes: Avoid crashes / infinite looping.
Fix to previous flag update changes: Avoid crashes / infinite looping.

--HG--
branch : HEAD

dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot