Weird timeout in Safari?

When I executed this code, that I have ran literally hundreds of times without issues

		repeat with i from extractedUntil to (eventCount - 1)
			log "i: " & i
			set JSToUseURL to JSGetDataPrefix & xpEventPrefix & i & xpEventSuffixURL & JSGetStringSuffix
			set JStoUseTitle to JSGetDataPrefix & xpEventPrefix & i & xpEventSuffixTitle & JSGetStringSuffix
			set JSToUseTime to JSGetDataPrefix & xpEventPrefix & i & xpEventSuffixTime & JSGetStringSuffix
			set JSToUseVenue to JSGetDataPrefix & xpEventPrefix & i & xpEventSuffixVenue & JSGetStringSuffix
			
			try
				log "Title: " & JStoUseTitle & " :"
				set title to do JavaScript JStoUseTitle

I got a really weird error message between log "i" and log "title": There was an error in Safari. Safari AppleEvent timed out (my translation) as well as this odd file path:

I am just concatenating some text strings here. How can that time out??

(In the event log I see the log i message but not the log title message).