b/16039656 Script error when re-selecting a saved object/task

Replaying #1510 onto the s32 branch