Previous "duplicate const" fix accidentally deleted some checking code instead of fixing it.
Previous "duplicate const" fix accidentally deleted some checking code instead of fixing it.

LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot