Auto-search ignores invalid keys.

This should complete #81 (and #28 I think we will retire since we now do auto-search).