SF bug #1002530:  test_decimal fails if repeated

* Protect the pre-defined contexts by using a deepcopy() instead of copy().
* Micro-optimization:  prefer x&1 over x%2
1 file changed