Fixes #2615 - failed to save host group

If there was current organization selected, organizations got doubled
which prevented save. Fixed and added test for this part.