Replace block ids in buffer properly

Previously it was replacing nibble byte which will be used to decode
next block, which resulted in id get error.
Now we replace nibble only when 2 blocks bound to this nibble are ready