[BUG #8450] Consider the parent chain for focusing