[#1060] Fix bug in CompositeByteBuf which let the buffer expand in a incorrect way and so result in corrupted data