Added locking when accessing the interned strings cache.