Fixed BZ#1079172 - Tags that have no categories are ignored in queries.