Instead of building the result vector with push_back, I now use the vector c'tor with iterators directly.