Refactor fake worker loading (issue 3862)

Fixes #3862.