Fix crash on search before sync is complete
Remove unused using statement
Merge pull request #3184 from pboyer/PkgSearchCrashFix

MAGN-5442: Fix crash on search before sync is complete