Fix generation of ids for multiple checkboxes. Resolves ticket 4064.