however, avoiding possibly a large amount of bugs in code that does not expect this corner case. I would certainly consider it much cleaner solution than adding hacks to for_each_index and possibly other places that do not expect something as weird.
But there are a *huge* number of types. You have arrays, records, even FP to integer and vice versa. That being said, I think your patch is safe and will not break any of the uses of for_each_index. OK, thanks.