Fixes #4367: when creating a Group or a Rule, the category should be set...

... to the currently selected category