Disable constrained changes when underlying index is failed.

Add test to verify that changes are prevented in this situation.
Currently the reason given in the exception is incorrect; this will
be resolved when we properly separate schema and data changes.