During filming, the authorities discovered “It Was Just an Accident.” But a French producer had been engaged to finish this ultimate winner of the top prize at Cannes.