Fixed: scope issue was causing a fatal error when a search had result

@frankrousseau I need a merge/publish of this in order to make cozy-files latest version working.