Moved initialization of KeyValue's before calls to `addResult`.