MDL-42732 glossary: fix use of hook when empty and searching using a keyword.