Revert "ed00639" "edf8175" revisions.

Because I noticed that I needn't get last (biggest) hostsgroups id from DB.