So because the $nshost variable was a global the SoapClient would try to find domains in getNetSuiteHosts() with the last $nshost used. After you push a lead on staging that gets set to webservices.sandbox.netsuite.com and then we try to get the hosts with that url but the account id we are using to look up the hosts does not exist on the sandbox environment.
Merge pull request #8 from rgmccaw/fix-persistent-setting-messing-up-shit-issue

Fix netsuite sync/push issue