Make sure find_expired_indices doesn't skip over closed indices

Fixes #51