[Core] Fix passing an rvalue reference of ErrorOr.