templates/query: Fix repeated terms in freq info