When you change the dependency in the ParameterSelectDialogBox, the selected object in the Object List resets to the top object in the list.
+ Build the attached script
+ Add a new spacecraft
+ Go to the mission tree and open the dialog box for Vary TOI
+ Click Edit button
+ Change object type to Spacecraft
+ Select Spacecraft1 in Object List
+ Select RadPer in the ObjectPropertiesList
+ Change dependency to Mars.
I see at the last step, the selected object change from from Spacecraft1 to DefaultSC.