store defmap in tls rather than threading it through clean