Disable pull-to-refresh when remote search is not allowed

Fixed issue 6151
Restore instance state in correct order

Fixes issue 5968
Merge remote-tracking branch 'upstream/master'