Fixes #9955 (Using memcpy with overlapped buffers in vector)