Updated check for unique division of patients over groups