fix concurrency issues in StringLocks by temporarily disabling garbage collection of locks