Add sorting within active and inactive groups, also inactive go last.