fixes issue if grouped association ids are all NULL