backport of #1133, Don't drop query params inlined in the URL