Fix a bug when multiple calls to QB's _compile_wh() or _compile_group_by() are required