Implemented early flattening for nested buffers

https://github.com/kfgodel/toString/issues/6