Generator: emit the ThreadSafe attribute for methods too