[Bug 1003631] Long regular expression back-reference number wraps to negative value and causes a segmantion fault