Fixes#7879.
If we enter a search string that results in zero results, the grid
resize to one row attempts to select row zero. However, we prevent this.
This leaves the current row outside the range of valid rows, which means
the grid is in an invalid state.
This later causes a crash if the user attempts to mousewheel up. There
may be other similar crashes in this situation, but I haven't found any
yet.
Fix is to allow selection of row zero when there is only one row. I have
not found any problems caused by allowing this.
It appears that components within a docking form are unable to be
focused in some, rare contexts. We don't want to crash, and the end
result of not focusing is not really all that tragic, so let's just
mask the exception.