Fix for ArgumentOutOfRangeException when using both UrlSegment and Query parameters