More preparation for filtering relevant terms in TermDb.