Fix Issue 10058.

Fixes http://d.puremagic.com/issues/show_bug.cgi?id=10058

Though maybe some other implementations of ::toCppMangle should be altered to have the same logic as the change here?