That works too, yes, but is there something wrong with my approach? Not that it matters, but there's 1 less flag to worry about, and same amount of checks (check liveness of key or map, instead of the new flag).
It should possible yes, but that would need a pointer to WeakMap instead of the flag. Anyway, the part I don't like is the extra pass (which should be possible to avoid with reference tracking).