Groups always had zero z index

Newly added groups were always initialising their z index to zero, instead of their position in the parent child list.