Includes an optimization for simple ByteBuffer duplication. Issue: SPR-13056 (cherry picked from commit 792b7b9)
792b7b9