Fix `optgroup` normalization and add test

Ref gh-102