LPS-39749 Optimize MergeLayoutPrototypesThreadLocal key generation