Avoid creating circular reference cycles by sidestepping the use of a local variable to sys.exc_info[2].

This avoids the need to rely on the Python garbage collector to detect and remove unreachable cycles.

See: https://code.djangoproject.com/ticket/10758#no1

Also see: https://code.djangoproject.com/attachment/ticket/10758/patch.diff