Do not crash in find() if array is empty

This fixes FS 1292, but with my own slightly different patch.
simplify return statement