glossary: Remove global state
Initialize the dictionaries each time the glossary() function is called.