Correctly reset 'hide_children_in_tree'

Correctly reset the 'hide_children_in_tree' property to 0 when changing Resource Type.