In order to cater for nested classes with names that end
with '$', which lead to ambiguity when unmangling expanded
names.

It's piecemeal, and no doubt there are other nasty surprises in
store for those inclined to flash their $$$ in identifier names, but
the method changed is not used widely and this solves the reported problem.

SI-2806 remains open to address the deeper problem.