Fix overlay code; don’t restore after freeing

After potentially unloading the module, the hook on the module was restoring the code in-memory. This is obviously wrong. Now, the hook restores original code before (pot.) unloading.