I have the Advanced Help module installed, and the help text is indexed in the search_index table, with the 'sid' field pointing to the associated record in the advanced_help_index table.
This means that the search_files_attachments_search function retrieves the search meta-data, and there are both a help text and an attachment with the same 'sid', the search snippet returned pulls the help text here:
$file = db_fetch_object(db_query("
SELECT f.*, d.data, u.nid
FROM {files} AS f
JOIN {upload} AS u
USING(fid)
INNER JOIN {search_dataset} AS d
ON f.fid = d.sid
WHERE fid = %d
", $item->sid));
If I modify this (and I'm not suggesting this is the fix for the issue) to:
$file = db_fetch_object(db_query("
SELECT f.*, d.data, u.nid
FROM {files} AS f
JOIN {upload} AS u
USING(fid)
INNER JOIN {search_dataset} AS d
ON f.fid = d.sid and d.type = 'search_files_att'
WHERE fid = %d
", $item->sid));
then the proper snippet is returned.