fixed the way indexes are built by migration #1045

This makes sure they appear in system.indexes