Fix thread local map cloning