Currently, any changes to the HttpFoundation\Request::$query properties after calling any of the request instantiation methods will not be reflected when Request::getUri is called. This is due to the way the Request::getQueryString method is implemented.
This will either require a work around or a change in the HttpFoundation\Request class.