Sanitize search
Check ancestor was returned Closes #4156