fixes #5836 Duplicate keys creating for key/value field