When this happens in English, teachers will label this as "bad English" and ask you to rewrite. That's how the formal language deals with this problem.
If anything, isn't that an informal solution? It relies on other people to complain that they dislike the sentence, without being able to point to any hard-and-fast rule.
The hard and fast rule is that repeating a word right next to itself is generally frowned up. It comes up with “that” a lot, like “he said that, that led to something else”. Sometimes people are doing something clever with the words, but it’s usually just poor English.