Refactor fake worker loading (issue 3862)

Fixes #3862.

__Edit:__ Test easily with http://107.22.172.223:8877/14fc215e719b37e/web/viewer.html#disableWorker=true