From http://wiki.nginx.org/HttpRewriteModule#rewrite

"If you specify a ? at the end of a rewrite then Nginx will drop the original $args (arguments). When using $request_uri or $uri&$args you should specify the ? at the end of the rewrite to avoid Nginx doubling the query string."

So $request_uri already includes the query string params.