Extract findChildHoleElement function