Use refresh, not flush, silly me.
Fix bug in index type naming found by the test suite.