incorrect results when mod is sufficiently large

modp16 is correct but modp17 (and 18 but didn't put the test in as it takes a long time) aren't.  This also happens when BN.red is used instead of BN.mont but again takes a long time.