In folded view, some type of data are listed as one icon per item,
others are 'compacted' as a single icon with a counter (also indicating
the active item).
Not quite sure if {rB92dfc8f2673e} was meant to do this (if it was, this
was not working though because relevant code would only get executed for
object hierarchies it seems), so now this is done for bones.
Fixes T88413.