Prepare for 1.6.2
Fix support for long (>64k chars) queries in layergroup creation

Closes #111. Includes testcase.