fix #25456: Spurious key signatures appear when layout changes