Only do the delete hack if it's the first key press

This avoids unexpectedly deleting when you spam backspace
to clear a failed search query.