Write access array in group context should contain that groups acl

fixes a bug introduced by #6393
adds a regression test