[3.8] Fix #1564 Fields selection in advanced search is broken