Fix database authentication with multi-table layergroups