disable repldiscovery and use consistent error codes on failure; fixes dumprestore3.js