Container's OnObjectValidate requires two file selections for Insert step
Operating system version
OS X 10.7.5
Description of the issue
When a container field has an OnObjectValidate script attached and a script step prompts for an image or file to be inserted in that field, the file selection will need to be made twice.
Steps to reproduce the problem
Assign an OnObjectValidate script of any sort to a container field. Create a button which performs Insert Picture, Insert PDF (if it's a PDF-enhanced field), or Insert File without specifying the file to use.
When you click the button while said container field is active, you'll be prompted for a file, the OnObjectValidate script will run, and you'll again be prompted for the file.
The sequence of events is as follows:
1) file dialog
4) file dialog (again)
This occurs regardless of the type of file being inserted, regardless of the optimization method of the container (image vs. interactive PDF), regardless of whether the Insert step is a raw button step or is placed within a script, and regardless of whether the OnObjectValidate script exits with an explicit True result or simply exits without Exit Script specifying a result.
It does not happen with the Insert commands from the menu (or via right-clicking on the container).
If OnObjectValidate is turned off for the container field, the sequence of events will instead be 1, 2, 5, 6 (only a single dialog, as expected).
Don't use OnObjectValidate for container fields if an Insert step will be used anywhere.