Check that the buffer doesn't change size.