The code for generating exception_indexes on type annotations for exception parameters uses bad patterns, and needlessly mutates type_index, preventing it from being made final. It should be redesigned and rewritten, and type_index should be made final