Don't allow unallocated indexes to be closed.

Closes #3313