Merge "Fix broken language matching logic in TSMS"