Fix overflow error in Python re module.