1037 Fix tests broken by modifications in batch queries