Fixed error in firstchild redirect detection