gpu.c: group_array_references: take into account "last_shared" for overlap
gpu.c: group_array_references: take into account "last_shared" for overlap

Two array references that have access some elements in common
and where one of the two is a write, should be considered as a single group.
When performing this test, we did not take into account that mapping
to/from shared/private memory may not happen at the innermost loop,
but may intead happen at an outer loop (as indiccated by "last_shared").

Check for overlapping writes again after computing "last_shared".

Signed-off-by: Sven Verdoolaege <e5350bbed4977f5eb8ae1dc6abd9ae59d21ace75@kotnet.org>

nicolasvasilache/ppcg,Meinersbur/ppcg,Meinersbur/ppcg,nicolasvasilache/ppcg