fix #41696: Barline added in a score does not appear in the parts and leads to a crash