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

..._gallery_tags

For more detail, see this thread: http://forums.modx.com/thread/81497/gallery-component-only-showing-50-of-gallery-items-v1-5-2-on-modx-2-2-6-advanced