This should fix most issues with offline operation. Fixes #14486 Fixes #13991 Alternate to #15363 and #15593