Remove all assignments of thread-locals to module-globals in inv