Don't leak type variables (fixes #12).