Fixes leakage of typing environment from one defasm to the next.