CMS-1008 Fix indexing of collections

Lots of stuff concerning collections