What do you as an author of the novelization do when you stumble across a glaring inconsistency in a film script? Do you have to ask for permission before you try to explain it?
In general, it depends. I'm not going to make any radical changes to the plot, but, depending on how glaring it is, I may try to rationalize it a bit.
That sounds vague, but, honestly, it's a judgment call. You don't want to put so much effort into explaining it away that you call attention to the plot hole or whatever, but if you can discreetly put a bandaid over it . . . .
"Special Agent Mark Starr retrieved the extra pistol he kept in the glove compartment. It was a good thing he had brought a spare since he lost his other gun in that cave-in."