on monarch-2.5.0 :
when you import some templates where directive "hostgroups" is set, all hosts depending of these templates are assigned to the corrects groups.
But after the import, this directive does'nt exist on the GUI.
When you export the configuration, the template has lost this directive.