LPS-45109 infinite loop in StringUtil.replace