FIXED: Possibility that free_search_state() is called twice.