Use subselects for matching taxonomies, instead of LEFT JOIN. Fixes #532.