patch applied (hugs98): Add more locking to the buffer, pretty much at random (I have no replicable test case, and no idea whats going on, but it doesn' t seem to break anything)