The below code will make the uninstaller throw an NSIS error and fail to launch:
MessageBox MB_OK "Working"
The problem is fixed by setting allowrootdirinstall true. This is a bug because allowrootdirinstall should only affect the installer, not the uninstaller. And even if it should affect the uninstaller, it should not prevent the uninstaller from launching.