Attribute group code generation algorithm is incorrect because it returns null for an attribute group with non-Latin name

For example, the algorithm return null (exactly null, not empty string) then the group name is in Cyrillic.

This leads to the bugs: