Fix order of query bindings

This is related to https://github.com/laravel/laravel/issues/1677.

What this allows us to do is dynamically add a WHERE condition to a query object that already has a GROUP BY / HAVING clause configured.
I need this ability in FluxBB's extension system.