Fixes InternalIndexShard callback handling of failure

Closes #5945