BUG: odr: avoid memcpy to the same address

Silences a Valgrind warning.
Merge pull request #2699 from pv/fix-odrpack

BUG: odr: avoid memcpy to the same address