Fix possible NULL pointer dereference in afh_get_header().