Fix result of is_prime(p^2) for p a prime.

Previously is_prime(9), is_prime(25), is_prime(49), etc all returned true.