It seems that the latest version of Ag, adds newlines when both `--nogroup --noheading` are provided. With just `--nogroup` it works as expected.