Deja-Vu : was it supposed to end like this? (Spoiler alert)

I just saw Deja-Vu by Tony Scott the other day and I cannot imagine that this was the ending he had in mind.
Through the first half of the film you are given clues that everything is preordained and inevitable.

His colleagues car gets found on the ferry among other things

But in the end the future is changed and everybody lives happily ever after.
Was this a rewrite by the studio or after a test audience, or was this really Tony Scott’s intention?
I have tried finding information about it but my Google-Fu isn’t strong enough.

Didn’t someone ask this question before?