Fixes #4596 - change parent of hostgroup

Still a few things to polish up, such as the ```_parameters``` template, which should not require an explicit mention of ```@hostgroup``` since its used in other models.

Also this needs some testing. If anyone knows any cleaner way of doing this, I'd be glad to hear it.