fix #23154: undo StaffTypes crash

Undoing Staff Type no longer causes crash