Add keep-buffer-shadow mechanism.