וַיַּהֲפֹךְ֩ ה׳ אֱלֹקיך לְּךָ֛ אֶת־הַקְּלָלָ֖ה לִבְרָכָ֑ה (Devarim 23:6)
Why the extra לְּךָ֛ in the pasuk? I saw suggested as follows: all of the klalos of Bilam were flipped to become brachos. Yesh lachkor do we therefore view Bilam as a m'vareich, or is Bilam a m'kalel, but Hashem fixed the outcome for us? Nafka minah -- Hashem promised Avraham וַאֲבָֽרְכָה֙ מְבָ֣רְכֶ֔יךָ וּמְקַלֶּלְךָ֖ אָאֹ֑ר. Does Bilam get credit for giving bracha and deserve bracha in return, or does Bilam deserve condemnation for being a m'kalel, and it's only Hashem's intervention that changed his words? The pasuk answers וַיַּהֲפֹךְ֩ ה׳ אֱלֹקיך לְּךָ֛ אֶת־הַקְּלָלָ֖ה לִבְרָכָ֑ה, that for us and us alone the k'lala counts as a bracha, but viz a viz Bilam, he is still considered a m'kalel.
I would like to suggest a different answer based on the comment of the Kli Yakar to that pasuk. Kli Yakar raises three questions.
1) It's understandable to say that Bilam gave a bracha INSTEAD of a klala, but what does it mean to say that the klala BECAME a bracha?
2) The gemara darshens that all of the brachos given by Bilam ultimately, later in history, were fulfilled as klalos, as he originally intended. The one exception is מַה־טֹּ֥בוּ אֹהָלֶ֖יךָ יַעֲקֹ֑ב מִשְׁכְּנֹתֶ֖יךָ יִשְׂרָאֵֽל, which remained a bracha for all eternity. That's why the pasuk says וַיַּהֲפֹךְ֩ ־הַקְּלָלָ֖ה לִבְרָכָ֑ה in the singular -- because only one of the klalos was forever after really transformed. Why is this bracha different than all the others?
3) And how did Chazal derive from the pasuk pasuk that it was davka that bracha which never changed?
Kli Yakar says a yesod: G-d does not wantonly change the rules of nature. For Hashem to do so requires great zechuyos. If a klala points to something bad happening, if the stars are aligned against a person, if the normal course of events point to a certain bad outcome, the ideal is to find a way within derech ha'teva to arrive at a different outcome, not to suspend the rules entirely. For example, the gemara says that a person born at the time of a certain mazal may be bloodthirsty. Derech ha'teva compels him in a certain direction, but that doesn't mean his becoming a murderer is fixed short of uprooting the rules. He can choose to be a shochet and do good with that talent. It's possible to work within the system and get a different result.
With respect to the intended klalos of Bilam, Hashem could find no way to redirect Bilam's intentions and his words short of uprooting them, changing the rules of the game. When Klal Yisrael has great zechuyos, this works, but over our long history, unfortunately that's isn't always the case, and so the klalos came back to bite us.
However, when it came to the klala Bilam wanted to give of destroying our mikdashot, here Hashem did not need to uproot the rules to change the outcome.
מזמור לאסף וגוּ קינה לאסף מיבעי ליה ודרש כך שאמר אסף שירה על שכילה הקב"ה חמתו בעצים ואבנים שבביתו ומתוך כך הותיר פליטה בישראל שאלמלא כך לא נשתייר משונאי ישראל שריד וכן הוא אומר כלה הּ את חמתו ויצת אש בציון
The destruction of the Mikdash spared us from destruction. Because Hashem was able vent his anger on stones, on a building, we were saved. In this case, and in this case alone, the klala itself, even when fulfilled, led to a positive outcome.
Therefore, davka in this case, the Torah is justified in using the word יַּהֲפֹךְ֩ . Davka here, the klala itself as Bilam intended was not uprooted, but rather was transformed into something positive.
Getting back to the original question of why the extra word לְּךָ֛, Chazal tell us that had the nochrim appreciated what the Mikdash did for them, for the world, they would have put up guards to protect it and not destroyed it. Churban ha'bayis was for them a SELF destructive act, as it cut off a source of bracha that they also derived benefit from. However, for us, as difficult and painful as the churban was, it was מזמור לאסף. It ensured the continuity and preservation of Jewish life. וַיַּהֲפֹךְ֩ ה׳ אֱלֹקיך לְּךָ֛, the benefit was davka only for us, but for the nochrim, for the world that allowed the destruction to take place, there was no upside.