For anyone else reading this, the above code will automatically add parent terms to a post where a child post has been added whenever a post is updated (i.e. via a front-end CRED form or in the admin pages), so if the user selects "Orlando" then the ancestor terms "Florida" and "USA" will automatically be added, too.
Note that the code runs whenever any kind of post is updated, it may make sense to add a conditional check that a particular post type that the taxonomy has been assigned to is being updated.
Thanks for sharing your solution!
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.