motifs expansion: remove duplicate nodes

Bugs

Description

motifs expansion creates duplicate nodes what turn to some troubles especially for tei:pb. there are rare cases of this, but they break publication process.

a workaround is set up.

How to reproduce the bug

  • publish 3r9dz
  • check tei:pb[@n='19'] in the intermediate format.

Severity

Critical

Program and – if applicable – dependency version

/cc Mathias Göbel, Frank Schneider, Michelle Weidling