Index: uspace/lib/cpp/include/impl/vector.hpp
===================================================================
--- uspace/lib/cpp/include/impl/vector.hpp	(revision b946b052fccd6c42cda54b3077e1e5c74d524625)
+++ uspace/lib/cpp/include/impl/vector.hpp	(revision 83aea53d851a2b1990b3ddc749f7bbbb30c5f4ea)
@@ -394,6 +394,6 @@
                 auto pos = const_cast<iterator>(position);
 
-                shift_(pos, 1);
-                allocator_.construct(pos, std::forward<Args>(args)...);
+                pos = shift_(pos, 1);
+                allocator_.construct(pos, forward<Args>(args)...);
 
                 return pos;
@@ -404,8 +404,7 @@
                 auto pos = const_cast<iterator>(position);
 
-                shift_(pos, 1);
+                pos = shift_(pos, 1);
                 *pos = x;
 
-                ++size_;
                 return pos;
             }
@@ -415,8 +414,7 @@
                 auto pos = const_cast<iterator>(position);
 
-                shift_(pos, 1);
+                pos = shift_(pos, 1);
                 *pos = forward<value_type>(x);
 
-                ++size_;
                 return pos;
             }
@@ -426,10 +424,9 @@
                 auto pos = const_cast<iterator>(position);
 
-                shift_(pos, count);
+                pos = shift_(pos, count);
                 auto copy_target = pos;
                 for (size_type i = 0; i < count; ++i)
                     *copy_target++ = x;
 
-                size_ += count;
                 return pos;
             }
@@ -442,8 +439,7 @@
                 auto count = static_cast<size_type>(last - first);
 
-                shift_(pos, count);
-                std::copy(first, last, pos);
-
-                size_ += count;
+                pos = shift_(pos, count);
+                copy(first, last, pos);
+
                 return pos;
             }
@@ -453,8 +449,7 @@
                 auto pos = const_cast<iterator>(position);
 
-                shift_(pos, init.size());
-                std::copy(init.begin(), init.end(), pos);
-
-                size_ += init.size();
+                pos = shift_(pos, init.size());
+                copy(init.begin(), init.end(), pos);
+
                 return pos;
             }
@@ -550,8 +545,13 @@
             }
 
-            void shift_(iterator position, size_type count)
+            iterator shift_(iterator position, size_type count)
             {
                 if (size_ + count < capacity_)
-                    std::copy_backwards(pos, end(), end() + count);
+                {
+                    copy_backward(position, end(), end() + count);
+                    size_ += count;
+
+                    return position;
+                }
                 else
                 {
@@ -566,10 +566,13 @@
 
                     // Copy before insertion index.
-                    std::copy(tmp.begin(), tmp.begin() + start_idx, begin());
+                    copy(begin(), begin() + start_idx, tmp.begin());
 
                     // Copy after insertion index.
-                    std::copy(tmp.begin() + end_idx, tmp.end(), begin() + start_idx);
+                    copy(begin() + start_idx, end(), tmp.begin() + end_idx);
 
                     swap(tmp);
+
+                    // Position was invalidated!
+                    return begin() + start_idx;
                 }
             }
