Fixed remote contacts overriding local ones in magic search + fixed incorrect search result source flag when using cache