Fixes in the advanced search, refs #4391