made the __iter__ method us a generator
BUG: remapping ids and fixing mismatch of ids in higher_order
Fixing #449 for regular weights - need to check for sparse class (wsp)
Fixed remapping and updating the cache when remapping ids
adjusting for side effects induced by fixing #449
Merge pull request #469 from sjsrey/idfix

Idfix for #449