Applied GROUP BY galItem.id to prevent duplication during LEFT JOIN modx_gallery_tags