Handle exiting active worker properly upon InstallEvent.replace() invocation. Fixes #364.