Ensure buffer local variable is not cleared by mode change.