Add tailrec annotation to checkDivisors.