fix missing application context when using a saved search

fixes #788

(cherry picked from commit 1c2265fab40a1fb0107def171c5d91ec793d62bf)