fixes #5182 Duplicate keys creating for key value field