I'd move this to the end of InternalIndexShard constructor. This would help keep the calls next to the places where the state variable is actually change.