Remove the need for _flatten_param_dict by passing doseq=1 to urlencode.