Check narrow class number before entering the loop on N.