up 5 levels is for considering performance. in most of cases,  UI hierarchy more 5 levels is too complex, and recommend to re-design.

exactly, we can absolutely iterate all it's parents. 

This is also a partial solution, it works fine for only all its parents are Widget type. if there is a Cocos node (eg. CCLayer) in the middle, it won't work.

Panel
....|
....| --- CCLayer
................|
................|--- Button

The design and implementation of Cocos UI components is sort of primitive so far. I have no idea this issue will be auto-fixed by itself's improvement / enhancement. so this is just a quick patch.