Add some tests to verify that SchemaState is flushed when indexes come online

The behaviour is already correct in this regard. This PR just adds assurance that we don't break this in the future.
You're right. The existing tests are fine as is, though they don't explicitly target the behaviour I wanted to verify. It's probably best to close this PR and rethink the approach.