Fix #209, bad JS generation for primes in patterns