is this needed?  hostgroup_name() checks for .blank? as the first thing it does.  Looks ok on my instance here.