Unfolded bus names are mangled when bus name contains sub/super/overbar formatting

Description

Overbar/superscript/subscript formatting in group or vector bus names produces mangled bus names when you unfold the buses:

Screenshot_2026-01-28_at_11.28.29_AM

i.e. bus_~{label}[0..5] unfolds to bus_label}0 etc. and bus~{label}{net1 net2} unfolds to bus_label}.net1 etc.

Steps to reproduce

  1. Open project: bus-names-overbar.zip
  2. Right click any of the buses and unfold
  3. Look at bus names in unfold menu
Application: KiCad Schematic Editor arm64 on arm64

Version: 9.99.0-5235-gb2867f737e, release build

Libraries:
	wxWidgets 3.2.8
	FreeType 2.14.1
	HarfBuzz 12.1.0
	FontConfig 2.17.1

Platform: macOS Sonoma Version 14.7.2 (Build 23H311), 64 bit, Little endian, wxMac
OpenGL: Apple, Apple M1, 2.1 Metal - 88.1

	wxWidgets: 3.2.8 (wchar_t,wx containers)
	Boost: 1.89.0
	OCC: 7.8.1
	Curl: 8.7.1
	ngspice: 45.2
	Compiler: Clang 16.0.0 with C++ ABI 1002
	KICAD_IPC_API=ON
	KICAD_USE_PCH=OFF