Steps to replicate:
1) Login as admin user
2) Create a course site and add only instructor1 and instructor2 as Instructor users
3) Modify Realm of new site to make both users Teaching Assistants .... Make instructor1 inactive Teaching Assistant
4) Go to Site Info of site and try to make instructor1 an active Instructor
Error produced: Alert: Cannot inactivate last user with role 'Instructor'
Problem: the check is incorrect.....