Don't use memcpy() on areas that may overlap

Change-Id: I88271e4b0e1f0722a95a78331ce78761251ffd8b