Remembering and restoring declarations