This fixes an issue where the current path (above the note tree) displays parts multiple times, e.g. A / A / B / B instead of A / B. The same issue could also affect other event handlers, but I didn't look around the codebase further.