Pass SmallVector by const reference instead of by value.