Fix invalid query result when key not present.
Merge pull request #1059 from tweise/hds

Fix invalid query result when key not present.