[C] Changes to make search and global search identical (or as close as possible without a lot of work)