We can probably do better in this method, but this is an improvement and enables further ErrorOr cleanups. llvm-svn: 241114