Fix cloning S with search_type, add tests