optimize streamAssert._origin function.