Follow-ups to #893 (search improvements for folders).