Properly calculate short name for inner class with $