Correct, the host edit form needs to be able to load the hostgroup defaults if either a) it's a new host, or b) it a discovered host which is being provisioned. We detect (b) with the above code (i.e. by looking for a type change)