Fix key generation for custom issue fields

Fixes key generation for custom issue fields (from #2233).