ast: fixed hang when checking bin-prot