Minor cleanup: test errors using HaveOccurred, more phantom error checking