To the author of said snippet. lsr.di.unimi.it/LSR/Item?u=1&id=1110 I will not approve it in it's current state.
It shows how to change BreakAlignment.break-align-orders, ok, though this is covered in the docs already. It's description says "Here's a workaround to get a traditional output when clef changes after a repeat barline!" This sounds like default LilyPond being wrong in this regard. If so, it's a bug, needed to be reported, probably discussed and finally fixed. Please check whether there's an issue about it already, if not report it on the bug-list. Tbh, I don't think LilyPond is wrong. Ofcourse I'd could be proven wrong. Cheers, Harm