Fixed bug in the generation of 'terms search' results.