rewrote clear-locals, still needs to mark for clearing closed-over locals