Fixed clobbering bug in checkArity

It was possible that the call to arityCheck could generate a fresh
variable which would overlap with one generated in termArity causing
incorrect values for a terms arity. I didn't include a test case
because it's PITA to produce.