repeated lines from merge(?) in package_search

https://github.com/okfn/ckan/blob/master/ckan/logic/action/get.py#L1451