Widget generates non-unique ids in case of multiple flashes

Fixes #6404