fix slow vector assembly on linux (if a list is given to construct a flat vector)