Fix: search for the right filename when falling back to filename-based search