Commit 7986e99e intended to make OPM Flow able to run simulation
cases whose active number of groups might exceed the declared
maximum number of (non-FIELD) groups (Item 3 of WELLDIMS). However,
we did not ensure that Item 21 of INTEHEAD contained the larger of
WELLDIMS(3) and the actual number of active groups.
This, in turn, meant that downstream consumers--such as the code to
enumerate groups according to their order of appearance in the
simulation deck--would generate subscripts/indices that were out of
bounds for the allocated tables. Flow's restart code would then not
produce any output and the user would not be aware of the problem
until attempting to restart a simulation or trying to visualise 3D
simulation results.
This commit corrects the situation by ensuring that we always store
the larger of the two sizes in INTEHEAD(21).
Pointy Hat: @bska