Correctly only pass back a keyvalueentry if anything is found.