util: Fix bug in DynamicByteBuffer.ensuredPut to preserve the buffer position as promised in the doc comment.