Proper support for multiple selection of same key; proper quoting for fields containing spaces