Fixing group import when there are categories see BT#7682