Fix group combo in staff type editor.

the group combo box accesses the wrong staff templates, as it uses the combo current item index rather than its data.

Also cleaned a potential infinite loop.
Merge pull request #920 from mgavioli/Fix_group_combo_in_staff_type_editor

Fix group combo in staff type editor.