Found while testing T235825: wikitech SAL: handle '{' and '}' in log entries:
I expected !log tools.stashbot {{phabT|T235825}} to expand the phabT template when it was written to a Wikitech SAL page, but the current behavior of changing | to {{!}} in the entire string prevents this from happening. We do want to escape bare | characters, but when they are found inside a {{...}} transclusion construct we really want to leave them as a literal |.