+ Grob *l = Tie::head (ties_[j], LEFT);
+ if (l && r)
+ {
+ // Don't mark accidentals as "tied" when the pitch is not
+ // actually the same. This is relevant for enharmonic ties.
+ Stream_event *le = Stream_event::unsmob (l->get_property ("cause"));
+ Stream_event *re = Stream_event::unsmob (r->get_property ("cause"));
+ if (le && re
+ && !ly_is_equal (le->get_property ("pitch"), re->get_property ("pitch")))
+ continue;
+ }
+