Adds firmer argument validation to SC.IndexSet methods in debug mode.

This isn't ready for pulling, but please use it to point out situations where framework classes are making improper use of SC.IndexSet, and I'll get them fixed up.