Put aggregate queries behind a flag