Thanks, useful patch!
One thing, two new global variables are defined, exported as module parameters, but they are not actually used:
``` int dlg_id_offset = 1; int dlg_id_increment = 1; ```
By name, I guess they are intended to be used for dialog id generation, but no code or docs related to them.