Fixing LOGSTASH-1171 using clones of hashes for thread safety