fixes #7928 retain context for custom search
Merge branch 'dev' into test