I've committed the patch with the changes below. Just to clarify my concern (since put to rest):
It was impossible to have null TYPE_MAX_VALUE until you introduced that in compute_array_index_type, and thus we didn't test for it; if we aren't doing that anymore I can't imagine where it would come from now.
The patch with the TYPE_MAX_VALUE checks has been in place for several weeks. Although unlikely, it seemed conceivable that a change could have gone in since then that has introduced a dependency on the domain being non-null for flexible array members in some corner case. But you know the code far better than me (and the changes being committed) so I trust you when you say the removal is safe. Martin