The ignore_unavailable option should also ignore indices that are closed

PR for #6471