"checked" class not added to checkboxes / radio buttons

When the label contains additional elements (span, b, em, etc.) then
the associated input's "checked" class is not toggled on the click
event. Fixes #2450