fix bug 990607: Ignore badly encoded referer headers when detecting search referer