Defensively checks that children exist in has_changes

Please review @cahrens @andy-armstrong 

@dan-f this should fix the issue you were having.