Should use || (OR) instead of && (AND). BTW, it is better to check if search_as_child is true instead of checking if search_as_child is not false.